From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#7464: 24.0.50; mouse highlighting vanishes upon unsplitting window Date: Fri, 30 Mar 2012 23:41:15 +0300 Message-ID: <83sjgpzus4.fsf@gnu.org> References: <877hg5l828.fsf@escher.home> <8362vp9rci.fsf@gnu.org> <83y68l88xd.fsf@gnu.org> <87sjh12a0d.fsf@gnu.org> <871uolhmdx.fsf@escher.home> <83d381u9xy.fsf@gnu.org> <87limpoenv.fsf@escher.home> <83vclts5aq.fsf@gnu.org> <87pqc0bzyp.fsf@escher.home> <83mx70imgh.fsf@gnu.org> <874nt7hm9q.fsf@escher.home> <83r4wb1byq.fsf@gnu.org> <87ty173tkt.fsf@escher.home> <83limi1tq6.fsf@gnu.org> <87sjgqqxyz.fsf@escher.home> <8362dm1mky.fsf@gnu.org> <87mx6yqray.fsf@escher.home> <83zkayz41f.fsf@gnu.org> <87iphlrif4.fsf@escher.home> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1333140192 28906 80.91.229.3 (30 Mar 2012 20:43:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 30 Mar 2012 20:43:12 +0000 (UTC) Cc: cyd@gnu.org, 7464@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 30 22:43:09 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SDif6-0005l5-VJ for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Mar 2012 22:43:09 +0200 Original-Received: from localhost ([::1]:46571 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDif6-0003Pl-CN for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Mar 2012 16:43:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDif2-0003Ot-Az for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2012 16:43:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDiez-0001hw-M6 for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2012 16:43:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDiez-0001hg-IX for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2012 16:43:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SDiez-00042p-HP for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2012 16:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2012 20:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7464 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7464-submit@debbugs.gnu.org id=B7464.133314014415500 (code B ref 7464); Fri, 30 Mar 2012 20:43:01 +0000 Original-Received: (at 7464) by debbugs.gnu.org; 30 Mar 2012 20:42:24 +0000 Original-Received: from localhost ([127.0.0.1]:59759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDieO-00041x-5N for submit@debbugs.gnu.org; Fri, 30 Mar 2012 16:42:24 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:44404) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDieL-00041o-CS for 7464@debbugs.gnu.org; Fri, 30 Mar 2012 16:42:22 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0M1P00300TEP9C00@a-mtaout23.012.net.il> for 7464@debbugs.gnu.org; Fri, 30 Mar 2012 23:41:14 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.100.223]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M1P003FETGP8060@a-mtaout23.012.net.il>; Fri, 30 Mar 2012 23:41:14 +0300 (IDT) In-reply-to: <87iphlrif4.fsf@escher.home> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:58359 Archived-At: > From: Stephen Berman > Cc: cyd@gnu.org, 7464@debbugs.gnu.org > Date: Fri, 30 Mar 2012 21:35:27 +0200 > > Hm, I have failed to find where its value becomes 1; every time I typed > `p mouse_face_overwritten_p' while stepping over the code, the value was > 0. I also tried `watch mouse_face_overwritten_p' at each update_window > breakpoint: that found where the value was set to 0, but every other > watchpoint was deleted unchanged after the program left the containing > block. This is consistent with the fact that the glyph matrices of the original window were freed and reallocated. They are cleared when they are allocated. > (gdb) > 385 XFlush (FRAME_X_DISPLAY (f)); > (gdb) > 386 UNBLOCK_INPUT; > > When I hit RET at the gdb prompt before UNBLOCK_INPUT, the highlighting > vanished. So I think this means that the GTK build, like non-GTK builds, removes the highlighting. It's just that, due to peculiarities of how Emacs works with X window system, the highlighting doesn't actually disappear from display until some time later, when Emacs flushes everything it has drawn to X. Now, how does the mouse highlighting gets restored in the GTK build, after it was cleared above? I think the answer to that was pointed out by Jan, earlier in this thread: the function xg_update_scrollbar_pos in gtkutil.c. It does this near its very end: x_sync (f); SET_FRAME_GARBAGED (f); cancel_mouse_face (f); And if you look at cancel_mouse_face, you will see that it does exactly what my proposed patch for delete-other-windows-internal would do! So could you please see if the above call to cancel_mouse_face is indeed made, in the GTK build, after mouse highlighting disappears? Actually, it would be good to put a breakpoint in cancel_mouse_face, right after you hit the breakpoint in Fdelete_other_windows_internal, type "continue", and see if that function ever gets called and by what code. When I try this on my system, I don't see the breakpoint inside cancel_mouse_face break at all when I reproduce the recipe with "emacs -q".