From: Chong Yidong Date: Sun, 12 Feb 2012 04:29:50 +0000 (+0800) Subject: * window.c (Fdelete_window_internal): Invalidate the mouse highlight. X-Git-Tag: emacs-pretest-24.0.94~164 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=95986d5276c475c84e8de8b8a31296bd2800ea94;p=emacs.git * window.c (Fdelete_window_internal): Invalidate the mouse highlight. Fixes: debbugs:9904 --- diff --git a/src/ChangeLog b/src/ChangeLog index cfbd29dbc85..0ded1fc7a67 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-02-12 Chong Yidong + + * window.c (Fdelete_window_internal): Invalidate the mouse + highlight (Bug#9904). + 2012-02-12 Glenn Morris * xselect.c (Fx_own_selection_internal) diff --git a/src/window.c b/src/window.c index 324689498ae..95e7d8a5685 100644 --- a/src/window.c +++ b/src/window.c @@ -3886,10 +3886,18 @@ Signal an error when WINDOW is the only window on its frame. */) && EQ (r->new_total, (horflag ? r->total_cols : r->total_lines))) /* We can delete WINDOW now. */ { + Mouse_HLInfo *hlinfo; + /* Block input. */ BLOCK_INPUT; window_resize_apply (p, horflag); + /* If this window is referred to by the dpyinfo's mouse + highlight, invalidate that slot to be safe (Bug#9904). */ + hlinfo = MOUSE_HL_INFO (XFRAME (w->frame)); + if (EQ (hlinfo->mouse_face_window, window)) + hlinfo->mouse_face_window = Qnil; + windows_or_buffers_changed++; Vwindow_list = Qnil; FRAME_WINDOW_SIZES_CHANGED (f) = 1;