From 7f43b5153aaa839a0f0eac3dad4ec5d03f9836b2 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 22 Nov 2006 15:10:06 +0000 Subject: [PATCH] (set_window_buffer): Clear mouse highlight if it is in this window. --- src/window.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/window.c b/src/window.c index 0629ee3af3a..12159dd8af7 100644 --- a/src/window.c +++ b/src/window.c @@ -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); } -- 2.39.2