]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_update_window_end): Handle overwritten mouse face
authorGerd Moellmann <gerd@gnu.org>
Wed, 21 Mar 2001 17:13:05 +0000 (17:13 +0000)
committerGerd Moellmann <gerd@gnu.org>
Wed, 21 Mar 2001 17:13:05 +0000 (17:13 +0000)
also for tool bar windows.
(show_mouse_face): Set the glyph row's mouse_face_p flag also when
DRAW is DRAW_IMAGE_RAISED.

src/ChangeLog
src/xterm.c

index 33246cf5d4b18d070b07c143008be749bc9b3163..2a5130151f5c40d94989a30172883ac468db73f1 100644 (file)
@@ -1,3 +1,10 @@
+2001-03-21  Gerd Moellmann  <gerd@gnu.org>
+
+       * xterm.c (x_update_window_end): Handle overwritten mouse face
+       also for tool bar windows.
+       (show_mouse_face): Set the glyph row's mouse_face_p flag also when
+       DRAW is DRAW_IMAGE_RAISED.
+
 2001-03-20  Gerd Moellmann  <gerd@gnu.org>
 
        * print.c (syms_of_print): Doc fixes.
index cd11231b122ca4a33a4b65d1ae55b5d80bcd60a5..0c7cac6d0d0c21e0ad1046070f52991058e2b7cb 100644 (file)
@@ -686,22 +686,12 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
      struct window *w;
      int cursor_on_p, mouse_face_overwritten_p;
 {
+  struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (w->frame));
+      
   if (!w->pseudo_window_p)
     {
-      struct x_display_info *dpyinfo
-       = FRAME_X_DISPLAY_INFO (XFRAME (w->frame));
-      
       BLOCK_INPUT;
 
-      /* If a row with mouse-face was overwritten, arrange for
-        XTframe_up_to_date to redisplay the mouse highlight.  */
-      if (mouse_face_overwritten_p)
-       {
-         dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
-         dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
-         dpyinfo->mouse_face_window = Qnil;
-       }
-      
       if (cursor_on_p)
        x_display_and_set_cursor (w, 1, output_cursor.hpos,
                                  output_cursor.vpos,
@@ -711,6 +701,15 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p)
       UNBLOCK_INPUT;
     }
   
+  /* If a row with mouse-face was overwritten, arrange for
+     XTframe_up_to_date to redisplay the mouse highlight.  */
+  if (mouse_face_overwritten_p)
+    {
+      dpyinfo->mouse_face_beg_row = dpyinfo->mouse_face_beg_col = -1;
+      dpyinfo->mouse_face_end_row = dpyinfo->mouse_face_end_col = -1;
+      dpyinfo->mouse_face_window = Qnil;
+    }
+      
   updated_window = NULL;
 }
 
@@ -7154,7 +7153,7 @@ note_tool_bar_highlight (f, x, y)
   int i;
   Lisp_Object enabled_p;
   int prop_idx;
-  enum draw_glyphs_face draw = DRAW_IMAGE_RAISED;
+  enum draw_glyphs_face draw;
   int mouse_down_p, rc;
 
   /* Function note_mouse_highlight is called with negative x(y
@@ -7173,7 +7172,6 @@ note_tool_bar_highlight (f, x, y)
       return;
     }
   else if (rc == 0)
-    /* On same tool-bar item as before.  */
     goto set_help_echo;
 
   clear_mouse_face (dpyinfo);
@@ -7481,7 +7479,7 @@ show_mouse_face (dpyinfo, draw)
 
       if (end_hpos > start_hpos)
        {
-         row->mouse_face_p = draw == DRAW_MOUSE_FACE;
+         row->mouse_face_p = draw == DRAW_MOUSE_FACE || DRAW_IMAGE_RAISED;
          x_draw_glyphs (w, start_x, row, TEXT_AREA, 
                         start_hpos, end_hpos, draw, NULL, NULL, 0);
        }