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