From: Chong Yidong Date: Wed, 22 Nov 2006 15:10:06 +0000 (+0000) Subject: (set_window_buffer): Clear mouse highlight if it is in this window. X-Git-Tag: emacs-pretest-22.0.92~568 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7f43b5153aaa839a0f0eac3dad4ec5d03f9836b2;p=emacs.git (set_window_buffer): Clear mouse highlight if it is in this window. --- 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); }