]> git.eshelyaron.com Git - emacs.git/commitdiff
(set_window_buffer): Clear mouse highlight if it is in this window.
authorChong Yidong <cyd@stupidchicken.com>
Wed, 22 Nov 2006 15:10:06 +0000 (15:10 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Wed, 22 Nov 2006 15:10:06 +0000 (15:10 +0000)
src/window.c

index 0629ee3af3a6d879152c61096a7a07e15abef5b3..12159dd8af7b9ffe9d69c3b11f5284d582dba35d 100644 (file)
@@ -3265,6 +3265,11 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p)
   struct window *w = XWINDOW (window);
   struct buffer *b = XBUFFER (buffer);
   int count = SPECPDL_INDEX ();
+#ifdef HAVE_WINDOW_SYSTEM
+  struct frame *f = XFRAME (w->frame);
+  Display_Info *dpyinfo = (f && FRAME_X_OUTPUT (f)) ?
+    FRAME_X_DISPLAY_INFO (f) : NULL;
+#endif
 
   w->buffer = buffer;
 
@@ -3345,6 +3350,11 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p)
        call1 (Vrun_hooks, Qwindow_configuration_change_hook);
     }
 
+#ifdef HAVE_WINDOW_SYSTEM
+  if (dpyinfo && EQ (window, dpyinfo->mouse_face_window))
+    clear_mouse_face (dpyinfo);
+#endif
+
   unbind_to (count, Qnil);
 }