aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorRichard M. Stallman2004-07-17 14:59:02 +0000
committerRichard M. Stallman2004-07-17 14:59:02 +0000
commit403de3b40ec8402fd2c24dc73b8ff4596921cd64 (patch)
treeed7f6623111ab4c4294998b9a96e6ec53adbb5e3 /src/window.c
parent15479e8b2fc5944d3b9254edbec69c4d2f3bb86c (diff)
downloademacs-403de3b40ec8402fd2c24dc73b8ff4596921cd64.tar.gz
emacs-403de3b40ec8402fd2c24dc73b8ff4596921cd64.zip
(coordinates_in_window): Inside the window but outside
its box to the L or R, return ON_VERTICAL_BORDER. (window_list_1): Rotate the list to start with WINDOW.
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c
index c09eaab85ba..907cc113916 100644
--- a/src/window.c
+++ b/src/window.c
@@ -670,7 +670,7 @@ coordinates_in_window (w, x, y)
670 670
671 /* Outside any interesting column? */ 671 /* Outside any interesting column? */
672 if (*x < left_x || *x > right_x) 672 if (*x < left_x || *x > right_x)
673 return ON_NOTHING; 673 return ON_VERTICAL_BORDER;
674 674
675 lmargin_width = window_box_width (w, LEFT_MARGIN_AREA); 675 lmargin_width = window_box_width (w, LEFT_MARGIN_AREA);
676 rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA); 676 rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA);
@@ -1799,7 +1799,7 @@ static Lisp_Object
1799window_list_1 (window, minibuf, all_frames) 1799window_list_1 (window, minibuf, all_frames)
1800 Lisp_Object window, minibuf, all_frames; 1800 Lisp_Object window, minibuf, all_frames;
1801{ 1801{
1802 Lisp_Object tail, list; 1802 Lisp_Object tail, list, rest;
1803 1803
1804 decode_next_window_args (&window, &minibuf, &all_frames); 1804 decode_next_window_args (&window, &minibuf, &all_frames);
1805 list = Qnil; 1805 list = Qnil;
@@ -1808,7 +1808,17 @@ window_list_1 (window, minibuf, all_frames)
1808 if (candidate_window_p (XCAR (tail), window, minibuf, all_frames)) 1808 if (candidate_window_p (XCAR (tail), window, minibuf, all_frames))
1809 list = Fcons (XCAR (tail), list); 1809 list = Fcons (XCAR (tail), list);
1810 1810
1811 return Fnreverse (list); 1811 /* Rotate the list to start with WINDOW. */
1812 list = Fnreverse (list);
1813 rest = Fmemq (window, list);
1814 if (!NILP (rest) && !EQ (rest, list))
1815 {
1816 for (tail = list; XCDR (tail) != rest; tail = XCDR (tail))
1817 ;
1818 XSETCDR (tail, Qnil);
1819 list = nconc2 (rest, list);
1820 }
1821 return list;
1812} 1822}
1813 1823
1814 1824