aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/window.c b/src/window.c
index 9a78ef1ed36..7b3f28ac799 100644
--- a/src/window.c
+++ b/src/window.c
@@ -684,7 +684,10 @@ coordinates_in_window (w, x, y)
684 684
685 /* Outside any interesting column? */ 685 /* Outside any interesting column? */
686 if (*x < left_x || *x > right_x) 686 if (*x < left_x || *x > right_x)
687 return ON_SCROLL_BAR; 687 {
688 *y -= top_y;
689 return ON_SCROLL_BAR;
690 }
688 691
689 lmargin_width = window_box_width (w, LEFT_MARGIN_AREA); 692 lmargin_width = window_box_width (w, LEFT_MARGIN_AREA);
690 rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA); 693 rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA);
@@ -741,9 +744,9 @@ coordinates_in_window (w, x, y)
741 ? (*x < right_x - WINDOW_RIGHT_FRINGE_WIDTH (w)) 744 ? (*x < right_x - WINDOW_RIGHT_FRINGE_WIDTH (w))
742 : (*x >= right_x - rmargin_width))) 745 : (*x >= right_x - rmargin_width)))
743 { 746 {
744 *x -= right_x; 747 *x -= right_x - rmargin_width;
745 if (!WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)) 748 if (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w))
746 *x -= WINDOW_RIGHT_FRINGE_WIDTH (w); 749 *x += WINDOW_RIGHT_FRINGE_WIDTH (w);
747 *y -= top_y; 750 *y -= top_y;
748 return ON_RIGHT_MARGIN; 751 return ON_RIGHT_MARGIN;
749 } 752 }
@@ -755,7 +758,7 @@ coordinates_in_window (w, x, y)
755 } 758 }
756 759
757 /* Everything special ruled out - must be on text area */ 760 /* Everything special ruled out - must be on text area */
758 *x -= left_x + WINDOW_LEFT_FRINGE_WIDTH (w); 761 *x -= text_left;
759 *y -= top_y; 762 *y -= top_y;
760 return ON_TEXT; 763 return ON_TEXT;
761} 764}
@@ -1031,7 +1034,8 @@ if it isn't already recorded. */)
1031 1034
1032 if (! NILP (update) 1035 if (! NILP (update)
1033 && ! (! NILP (w->window_end_valid) 1036 && ! (! NILP (w->window_end_valid)
1034 && XFASTINT (w->last_modified) >= MODIFF)) 1037 && XFASTINT (w->last_modified) >= MODIFF)
1038 && !noninteractive)
1035 { 1039 {
1036 struct text_pos startp; 1040 struct text_pos startp;
1037 struct it it; 1041 struct it it;
@@ -6234,7 +6238,7 @@ usage: (save-window-excursion BODY ...) */)
6234 ***********************************************************************/ 6238 ***********************************************************************/
6235 6239
6236static Lisp_Object 6240static Lisp_Object
6237window_split_tree (w) 6241window_tree (w)
6238 struct window *w; 6242 struct window *w;
6239{ 6243{
6240 Lisp_Object tail = Qnil; 6244 Lisp_Object tail = Qnil;
@@ -6247,10 +6251,10 @@ window_split_tree (w)
6247 XSETWINDOW (wn, w); 6251 XSETWINDOW (wn, w);
6248 if (!NILP (w->hchild)) 6252 if (!NILP (w->hchild))
6249 wn = Fcons (Qnil, Fcons (Fwindow_edges (wn), 6253 wn = Fcons (Qnil, Fcons (Fwindow_edges (wn),
6250 window_split_tree (XWINDOW (w->hchild)))); 6254 window_tree (XWINDOW (w->hchild))));
6251 else if (!NILP (w->vchild)) 6255 else if (!NILP (w->vchild))
6252 wn = Fcons (Qt, Fcons (Fwindow_edges (wn), 6256 wn = Fcons (Qt, Fcons (Fwindow_edges (wn),
6253 window_split_tree (XWINDOW (w->vchild)))); 6257 window_tree (XWINDOW (w->vchild))));
6254 6258
6255 if (NILP (result)) 6259 if (NILP (result))
6256 { 6260 {
@@ -6270,17 +6274,17 @@ window_split_tree (w)
6270 6274
6271 6275
6272 6276
6273DEFUN ("window-split-tree", Fwindow_split_tree, Swindow_split_tree, 6277DEFUN ("window-tree", Fwindow_tree, Swindow_tree,
6274 0, 1, 0, 6278 0, 1, 0,
6275 doc: /* Return the window split tree for frame FRAME. 6279 doc: /* Return the window tree for frame FRAME.
6276 6280
6277The return value is a list of the form (ROOT MINI), where ROOT 6281The return value is a list of the form (ROOT MINI), where ROOT
6278represents the window split tree of the frame's root window, and MINI 6282represents the window tree of the frame's root window, and MINI
6279is the frame's minibuffer window. 6283is the frame's minibuffer window.
6280 6284
6281If the root window is not split, ROOT is the root window itself. 6285If the root window is not split, ROOT is the root window itself.
6282Otherwise, ROOT is a list (DIR EDGES W1 W2 ...) where DIR is nil for a 6286Otherwise, ROOT is a list (DIR EDGES W1 W2 ...) where DIR is nil for a
6283horisontal split, and t for a vertical split, EDGES gives the combined 6287horizontal split, and t for a vertical split, EDGES gives the combined
6284size and position of the subwindows in the split, and the rest of the 6288size and position of the subwindows in the split, and the rest of the
6285elements are the subwindows in the split. Each of the subwindows may 6289elements are the subwindows in the split. Each of the subwindows may
6286again be a window or a list representing a window split, and so on. 6290again be a window or a list representing a window split, and so on.
@@ -6303,7 +6307,7 @@ selected frame. */)
6303 if (!FRAME_LIVE_P (f)) 6307 if (!FRAME_LIVE_P (f))
6304 return Qnil; 6308 return Qnil;
6305 6309
6306 return window_split_tree (XWINDOW (FRAME_ROOT_WINDOW (f))); 6310 return window_tree (XWINDOW (FRAME_ROOT_WINDOW (f)));
6307} 6311}
6308 6312
6309 6313
@@ -7112,7 +7116,7 @@ The selected frame is the one whose configuration has changed. */);
7112 defsubr (&Sset_window_configuration); 7116 defsubr (&Sset_window_configuration);
7113 defsubr (&Scurrent_window_configuration); 7117 defsubr (&Scurrent_window_configuration);
7114 defsubr (&Ssave_window_excursion); 7118 defsubr (&Ssave_window_excursion);
7115 defsubr (&Swindow_split_tree); 7119 defsubr (&Swindow_tree);
7116 defsubr (&Sset_window_margins); 7120 defsubr (&Sset_window_margins);
7117 defsubr (&Swindow_margins); 7121 defsubr (&Swindow_margins);
7118 defsubr (&Sset_window_fringes); 7122 defsubr (&Sset_window_fringes);