changeset 74121:fd56562ea7ba

(set_window_buffer): Clear mouse highlight if it is in this window.
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 22 Nov 2006 15:10:06 +0000
parents 0769cd6b8ca7
children 92f9d0430fab
files src/window.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Wed Nov 22 15:09:54 2006 +0000
+++ b/src/window.c	Wed Nov 22 15:10:06 2006 +0000
@@ -3265,6 +3265,11 @@
   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 @@
 	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);
 }