aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Rudalics2014-02-26 09:07:34 +0100
committerMartin Rudalics2014-02-26 09:07:34 +0100
commitaea124c47dd16cde97fa467082b4be5f2c6d31f7 (patch)
tree8cfa0e8167024730eeed58632779e2a5c6e773de /src
parentb2388336fef199304f7050340a91fe559b634ba2 (diff)
downloademacs-aea124c47dd16cde97fa467082b4be5f2c6d31f7.tar.gz
emacs-aea124c47dd16cde97fa467082b4be5f2c6d31f7.zip
Fixes around Bug#16647.
* xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER cases. * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER only if the window has no right divider. (Fcoordinates_in_window_p): Fix doc-string.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog9
-rw-r--r--src/window.c25
-rw-r--r--src/xdisp.c10
3 files changed, 34 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 6e697e4c944..0c0d5964742 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,12 @@
12014-02-26 Martin Rudalics <rudalics@gmx.at>
2
3 Fixes around Bug#16647.
4 * xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and
5 ON_BOTTOM_DIVIDER cases.
6 * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER
7 only if the window has no right divider.
8 (Fcoordinates_in_window_p): Fix doc-string.
9
12014-02-25 Juanma Barranquero <lekktu@gmail.com> 102014-02-25 Juanma Barranquero <lekktu@gmail.com>
2 11
3 * lread.c (Funintern): Fix doc to match advertised calling convention. 12 * lread.c (Funintern): Fix doc to match advertised calling convention.
diff --git a/src/window.c b/src/window.c
index 0ec1aa96324..2fb0dcaadaa 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1269,12 +1269,12 @@ coordinates_in_window (register struct window *w, int x, int y)
1269 /* On vertical window divider (which prevails horizontal 1269 /* On vertical window divider (which prevails horizontal
1270 dividers)? */ 1270 dividers)? */
1271 if (!WINDOW_RIGHTMOST_P (w) 1271 if (!WINDOW_RIGHTMOST_P (w)
1272 && WINDOW_RIGHT_DIVIDER_WIDTH (w) 1272 && WINDOW_RIGHT_DIVIDER_WIDTH (w) > 0
1273 && x >= right_x - WINDOW_RIGHT_DIVIDER_WIDTH (w) 1273 && x >= right_x - WINDOW_RIGHT_DIVIDER_WIDTH (w)
1274 && x <= right_x) 1274 && x <= right_x)
1275 return ON_RIGHT_DIVIDER; 1275 return ON_RIGHT_DIVIDER;
1276 /* On the horizontal window divider? */ 1276 /* On the horizontal window divider? */
1277 else if (WINDOW_BOTTOM_DIVIDER_WIDTH (w) 1277 else if (WINDOW_BOTTOM_DIVIDER_WIDTH (w) > 0
1278 && y >= (bottom_y - WINDOW_BOTTOM_DIVIDER_WIDTH (w)) 1278 && y >= (bottom_y - WINDOW_BOTTOM_DIVIDER_WIDTH (w))
1279 && y <= bottom_y) 1279 && y <= bottom_y)
1280 return ON_BOTTOM_DIVIDER; 1280 return ON_BOTTOM_DIVIDER;
@@ -1294,9 +1294,10 @@ coordinates_in_window (register struct window *w, int x, int y)
1294 resize windows horizontally in case we're using toolkit scroll 1294 resize windows horizontally in case we're using toolkit scroll
1295 bars. Note: If scrollbars are on the left, the window that 1295 bars. Note: If scrollbars are on the left, the window that
1296 must be eventually resized is that on the left of WINDOW. */ 1296 must be eventually resized is that on the left of WINDOW. */
1297 if ((WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) 1297 if ((WINDOW_RIGHT_DIVIDER_WIDTH (w) == 0)
1298 && !WINDOW_LEFTMOST_P (w) 1298 && (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)
1299 && eabs (x - left_x) < grabbable_width) 1299 && !WINDOW_LEFTMOST_P (w)
1300 && eabs (x - left_x) < grabbable_width)
1300 || (!WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w) 1301 || (!WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)
1301 && !WINDOW_RIGHTMOST_P (w) 1302 && !WINDOW_RIGHTMOST_P (w)
1302 && eabs (x - right_x) < grabbable_width)) 1303 && eabs (x - right_x) < grabbable_width))
@@ -1331,6 +1332,7 @@ coordinates_in_window (register struct window *w, int x, int y)
1331 if (FRAME_WINDOW_P (f)) 1332 if (FRAME_WINDOW_P (f))
1332 { 1333 {
1333 if (!w->pseudo_window_p 1334 if (!w->pseudo_window_p
1335 && WINDOW_RIGHT_DIVIDER_WIDTH (w) == 0
1334 && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w) 1336 && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w)
1335 && !WINDOW_RIGHTMOST_P (w) 1337 && !WINDOW_RIGHTMOST_P (w)
1336 && (eabs (x - right_x) < grabbable_width)) 1338 && (eabs (x - right_x) < grabbable_width))
@@ -1339,6 +1341,7 @@ coordinates_in_window (register struct window *w, int x, int y)
1339 /* Need to say "x > right_x" rather than >=, since on character 1341 /* Need to say "x > right_x" rather than >=, since on character
1340 terminals, the vertical line's x coordinate is right_x. */ 1342 terminals, the vertical line's x coordinate is right_x. */
1341 else if (!w->pseudo_window_p 1343 else if (!w->pseudo_window_p
1344 && WINDOW_RIGHT_DIVIDER_WIDTH (w) == 0
1342 && !WINDOW_RIGHTMOST_P (w) 1345 && !WINDOW_RIGHTMOST_P (w)
1343 /* Why check ux if we are not the rightmost window? Also 1346 /* Why check ux if we are not the rightmost window? Also
1344 shouldn't a pseudo window always be rightmost? */ 1347 shouldn't a pseudo window always be rightmost? */
@@ -1352,8 +1355,8 @@ coordinates_in_window (register struct window *w, int x, int y)
1352 ? (x >= left_x + WINDOW_LEFT_FRINGE_WIDTH (w)) 1355 ? (x >= left_x + WINDOW_LEFT_FRINGE_WIDTH (w))
1353 : (x < left_x + lmargin_width))) 1356 : (x < left_x + lmargin_width)))
1354 return ON_LEFT_MARGIN; 1357 return ON_LEFT_MARGIN;
1355 1358 else
1356 return ON_LEFT_FRINGE; 1359 return ON_LEFT_FRINGE;
1357 } 1360 }
1358 1361
1359 if (x >= text_right) 1362 if (x >= text_right)
@@ -1363,8 +1366,8 @@ coordinates_in_window (register struct window *w, int x, int y)
1363 ? (x < right_x - WINDOW_RIGHT_FRINGE_WIDTH (w)) 1366 ? (x < right_x - WINDOW_RIGHT_FRINGE_WIDTH (w))
1364 : (x >= right_x - rmargin_width))) 1367 : (x >= right_x - rmargin_width)))
1365 return ON_RIGHT_MARGIN; 1368 return ON_RIGHT_MARGIN;
1366 1369 else
1367 return ON_RIGHT_FRINGE; 1370 return ON_RIGHT_FRINGE;
1368 } 1371 }
1369 1372
1370 /* Everything special ruled out - must be on text area */ 1373 /* Everything special ruled out - must be on text area */
@@ -1419,8 +1422,10 @@ measured in characters from the upper-left corner of the frame.
1419frame. 1422frame.
1420If COORDINATES are in the text portion of WINDOW, 1423If COORDINATES are in the text portion of WINDOW,
1421 the coordinates relative to the window are returned. 1424 the coordinates relative to the window are returned.
1425If they are in the bottom divider of WINDOW, `bottom-divider' is returned.
1426If they are in the right divider of WINDOW, `right-divider' is returned.
1422If they are in the mode line of WINDOW, `mode-line' is returned. 1427If they are in the mode line of WINDOW, `mode-line' is returned.
1423If they are in the top mode line of WINDOW, `header-line' is returned. 1428If they are in the header line of WINDOW, `header-line' is returned.
1424If they are in the left fringe of WINDOW, `left-fringe' is returned. 1429If they are in the left fringe of WINDOW, `left-fringe' is returned.
1425If they are in the right fringe of WINDOW, `right-fringe' is returned. 1430If they are in the right fringe of WINDOW, `right-fringe' is returned.
1426If they are on the border between WINDOW and its right sibling, 1431If they are on the border between WINDOW and its right sibling,
diff --git a/src/xdisp.c b/src/xdisp.c
index c35a64d0774..836b825aafa 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2452,6 +2452,16 @@ remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect)
2452 ? WINDOW_RIGHT_FRINGE_WIDTH (w) 2452 ? WINDOW_RIGHT_FRINGE_WIDTH (w)
2453 : 0))); 2453 : 0)));
2454 width = WINDOW_SCROLL_BAR_AREA_WIDTH (w); 2454 width = WINDOW_SCROLL_BAR_AREA_WIDTH (w);
2455 goto row_glyph;
2456
2457 case ON_RIGHT_DIVIDER:
2458 gx = WINDOW_RIGHT_PIXEL_EDGE (w) - WINDOW_RIGHT_DIVIDER_WIDTH (w);
2459 width = WINDOW_RIGHT_DIVIDER_WIDTH (w);
2460 goto row_glyph;
2461
2462 case ON_BOTTOM_DIVIDER:
2463 gx = 0;
2464 width = WINDOW_RIGHT_PIXEL_EDGE (w) - WINDOW_RIGHT_DIVIDER_WIDTH (w);
2455 2465
2456 row_glyph: 2466 row_glyph:
2457 gr = 0, gy = 0; 2467 gr = 0, gy = 0;