emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r116565: Fixes around Bug#16647.


From: Martin Rudalics
Subject: [Emacs-diffs] trunk r116565: Fixes around Bug#16647.
Date: Wed, 26 Feb 2014 08:11:02 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116565
revision-id: address@hidden
parent: address@hidden
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Wed 2014-02-26 09:07:34 +0100
message:
  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.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/window.c                   window.c-20091113204419-o5vbwnq5f7feedwu-231
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-02-25 22:51:34 +0000
+++ b/src/ChangeLog     2014-02-26 08:07:34 +0000
@@ -1,3 +1,12 @@
+2014-02-26  Martin Rudalics  <address@hidden>
+
+       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.
+
 2014-02-25  Juanma Barranquero  <address@hidden>
 
        * lread.c (Funintern): Fix doc to match advertised calling convention.

=== modified file 'src/window.c'
--- a/src/window.c      2014-02-22 21:49:10 +0000
+++ b/src/window.c      2014-02-26 08:07:34 +0000
@@ -1269,12 +1269,12 @@
   /* On vertical window divider (which prevails horizontal
      dividers)?  */
   if (!WINDOW_RIGHTMOST_P (w)
-      && WINDOW_RIGHT_DIVIDER_WIDTH (w)
+      && WINDOW_RIGHT_DIVIDER_WIDTH (w) > 0
       && x >= right_x - WINDOW_RIGHT_DIVIDER_WIDTH (w)
       && x <= right_x)
     return ON_RIGHT_DIVIDER;
   /* On the horizontal window divider?  */
-  else if (WINDOW_BOTTOM_DIVIDER_WIDTH (w)
+  else if (WINDOW_BOTTOM_DIVIDER_WIDTH (w) > 0
           && y >= (bottom_y - WINDOW_BOTTOM_DIVIDER_WIDTH (w))
           && y <= bottom_y)
     return ON_BOTTOM_DIVIDER;
@@ -1294,9 +1294,10 @@
         resize windows horizontally in case we're using toolkit scroll
         bars.  Note: If scrollbars are on the left, the window that
         must be eventually resized is that on the left of WINDOW.  */
-      if ((WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)
-          && !WINDOW_LEFTMOST_P (w)
-          && eabs (x - left_x) < grabbable_width)
+      if ((WINDOW_RIGHT_DIVIDER_WIDTH (w) == 0)
+         && (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)
+             && !WINDOW_LEFTMOST_P (w)
+             && eabs (x - left_x) < grabbable_width)
          || (!WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT (w)
              && !WINDOW_RIGHTMOST_P (w)
              && eabs (x - right_x) < grabbable_width))
@@ -1331,6 +1332,7 @@
   if (FRAME_WINDOW_P (f))
     {
       if (!w->pseudo_window_p
+         && WINDOW_RIGHT_DIVIDER_WIDTH (w) == 0
          && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w)
          && !WINDOW_RIGHTMOST_P (w)
          && (eabs (x - right_x) < grabbable_width))
@@ -1339,6 +1341,7 @@
   /* Need to say "x > right_x" rather than >=, since on character
      terminals, the vertical line's x coordinate is right_x.  */
   else if (!w->pseudo_window_p
+          && WINDOW_RIGHT_DIVIDER_WIDTH (w) == 0
           && !WINDOW_RIGHTMOST_P (w)
           /* Why check ux if we are not the rightmost window?  Also
              shouldn't a pseudo window always be rightmost?  */
@@ -1352,8 +1355,8 @@
              ? (x >= left_x + WINDOW_LEFT_FRINGE_WIDTH (w))
              : (x < left_x + lmargin_width)))
        return ON_LEFT_MARGIN;
-
-      return ON_LEFT_FRINGE;
+      else
+       return ON_LEFT_FRINGE;
     }
 
   if (x >= text_right)
@@ -1363,8 +1366,8 @@
              ? (x < right_x - WINDOW_RIGHT_FRINGE_WIDTH (w))
              : (x >= right_x - rmargin_width)))
        return ON_RIGHT_MARGIN;
-
-      return ON_RIGHT_FRINGE;
+      else
+       return ON_RIGHT_FRINGE;
     }
 
   /* Everything special ruled out - must be on text area */
@@ -1419,8 +1422,10 @@
 frame.
 If COORDINATES are in the text portion of WINDOW,
    the coordinates relative to the window are returned.
+If they are in the bottom divider of WINDOW, `bottom-divider' is returned.
+If they are in the right divider of WINDOW, `right-divider' is returned.
 If they are in the mode line of WINDOW, `mode-line' is returned.
-If they are in the top mode line of WINDOW, `header-line' is returned.
+If they are in the header line of WINDOW, `header-line' is returned.
 If they are in the left fringe of WINDOW, `left-fringe' is returned.
 If they are in the right fringe of WINDOW, `right-fringe' is returned.
 If they are on the border between WINDOW and its right sibling,

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2014-02-21 07:42:42 +0000
+++ b/src/xdisp.c       2014-02-26 08:07:34 +0000
@@ -2452,6 +2452,16 @@
                  ? WINDOW_RIGHT_FRINGE_WIDTH (w)
                  : 0)));
       width = WINDOW_SCROLL_BAR_AREA_WIDTH (w);
+      goto row_glyph;
+
+    case ON_RIGHT_DIVIDER:
+      gx = WINDOW_RIGHT_PIXEL_EDGE (w) - WINDOW_RIGHT_DIVIDER_WIDTH (w);
+      width = WINDOW_RIGHT_DIVIDER_WIDTH (w);
+      goto row_glyph;
+
+    case ON_BOTTOM_DIVIDER:
+      gx = 0;
+      width = WINDOW_RIGHT_PIXEL_EDGE (w) - WINDOW_RIGHT_DIVIDER_WIDTH (w);
 
     row_glyph:
       gr = 0, gy = 0;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]