Commit 7f43b515 authored by Chong Yidong's avatar Chong Yidong
Browse files

(set_window_buffer): Clear mouse highlight if it is in this window.

parent 63cb1543
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment