]> git.eshelyaron.com Git - emacs.git/commitdiff
(phys_cursor_in_rect_p): Check if cursor is in fringe area.
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Mon, 24 Dec 2007 03:01:28 +0000 (03:01 +0000)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Mon, 24 Dec 2007 03:01:28 +0000 (03:01 +0000)
src/ChangeLog
src/xdisp.c

index fa3d8e78b059e86fb082d21d0014241e229c9654..2a8fc8e3f17c1eed113338efa67dac5862822eda 100644 (file)
@@ -1,3 +1,7 @@
+2007-12-24  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * xdisp.c (phys_cursor_in_rect_p): Check if cursor is in fringe area.
+
 2007-12-23  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
        * macmenu.c (fill_menubar) [MAC_OSX]: Add workaround for Mac OS X 10.5
index 13660f413e70a5b9ee673abafaea1871972f39f7..fa53a98556f8af38e2baab828c373349b35df971 100644 (file)
@@ -23481,6 +23481,24 @@ phys_cursor_in_rect_p (w, r)
 {
   XRectangle cr, result;
   struct glyph *cursor_glyph;
+  struct glyph_row *row;
+
+  if (w->phys_cursor.vpos >= 0
+      && w->phys_cursor.vpos < w->current_matrix->nrows
+      && (row = MATRIX_ROW (w->current_matrix, w->phys_cursor.vpos),
+         row->enabled_p)
+      && row->cursor_in_fringe_p)
+    {
+      /* Cursor is in the fringe.  */
+      cr.x = window_box_right_offset (w,
+                                     (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
+                                      ? RIGHT_MARGIN_AREA
+                                      : TEXT_AREA));
+      cr.y = row->y;
+      cr.width = WINDOW_RIGHT_FRINGE_WIDTH (w);
+      cr.height = row->height;
+      return x_intersect_rectangles (&cr, r, &result);
+    }
 
   cursor_glyph = get_phys_cursor_glyph (w);
   if (cursor_glyph)