From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen Berman" Newsgroups: gmane.emacs.bugs Subject: bug#7464: 24.0.50; mouse highlighting vanishes upon unsplitting window Date: 31 Mar 2012 01:09:26 +0200 Message-ID: <87sjgp8z4p.fsf@escher.home> 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> <83sjgpzus4.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1333149010 26640 80.91.229.3 (30 Mar 2012 23:10:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 30 Mar 2012 23:10:10 +0000 (UTC) Cc: cyd@gnu.org, 7464@debbugs.gnu.org To: "Eli Zaretskii" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 31 01:10: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 1SDkxM-0001JK-4G for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Mar 2012 01:10:08 +0200 Original-Received: from localhost ([::1]:40096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDkxL-0004jo-Bh for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Mar 2012 19:10:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDkxI-0004hc-Eh for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2012 19:10:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDkxG-0005Ul-I3 for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2012 19:10:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDkxG-0005To-Ef for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2012 19:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SDkxG-0007bc-J5 for bug-gnu-emacs@gnu.org; Fri, 30 Mar 2012 19:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Stephen Berman" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Mar 2012 23:10:02 +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.133314897329197 (code B ref 7464); Fri, 30 Mar 2012 23:10:02 +0000 Original-Received: (at 7464) by debbugs.gnu.org; 30 Mar 2012 23:09:33 +0000 Original-Received: from localhost ([127.0.0.1]:59845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDkwn-0007ar-Fu for submit@debbugs.gnu.org; Fri, 30 Mar 2012 19:09:33 -0400 Original-Received: from mi.ruhr-uni-bochum.de ([134.147.64.33]:57408 helo=mx5.rz.ruhr-uni-bochum.de) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SDkwk-0007ai-Vi for 7464@debbugs.gnu.org; Fri, 30 Mar 2012 19:09:32 -0400 X-Queued: (qmail 17553 invoked by alias); 30 Mar 2012 23:09:28 -0000 X-Queued: (qmail 17540 invoked from network); 30 Mar 2012 23:09:28 -0000 Original-Received: from c2-3-4.rz.ruhr-uni-bochum.de (134.147.64.5) by mx5.rz.ruhr-uni-bochum.de with SMTP; 30 Mar 2012 23:09:28 -0000 X-Queued: (qmail 20374 invoked by uid 281); 30 Mar 2012 23:09:28 -0000 X-Qmailscanner: from 89.245.70.36 (Pj9yBs7kPuTNYwFjaY6+kw==@89.245.70.36) by c2-3-4.rz.ruhr-uni-bochum.de (envelope-from , uid 80) with qmail-scanner-2.01 (sophie: 3.05/3.29/4.75. Clear:RC:1(89.245.70.36):. Processed in 0.019744 secs); 30 Mar 2012 23:09:28 -0000 Original-Received: from i59f54624.versanet.de (HELO escher.home) (Pj9yBs7kPuTNYwFjaY6+kw==@89.245.70.36) by c2-3-4.rz.ruhr-uni-bochum.de with (DHE-RSA-AES128-SHA encrypted) SMTP; 30 Mar 2012 23:09:27 -0000 In-Reply-To: <83sjgpzus4.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 30 Mar 2012 23:41:15 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) 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:58364 Archived-At: On Fri, 30 Mar 2012 23:41:15 +0300 Eli Zaretskii wrote: >> (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. You missed that I said that protocol was from the Athena build; however, it is exactly the same in the GTK build with toolkit scrollbars disabled. With GTk scrollbars enabled, the highlighting doesn't disappear at all. > 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? Again, AFAICT the highlighting does not disappear when GTK scrollbars are enabled. > 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". It's the same for me when I do this with the GTK scrollbars disabled, the execution does not stop at cancel_mouse_face: Breakpoint 3, Fdelete_other_windows_internal (window=141773653, root=139210986) at /data/steve/bzr/emacs/quickfixes/src/window.c:2569 2569 w = decode_any_window (window); (gdb) br cancel_mouse_face Breakpoint 19 at 0x80acc38: file /data/steve/bzr/emacs/quickfixes/src/xdisp.c, line 27545. (gdb) c Continuing. At this point, the highlighting has vanished. But when I set the breakpoint with GTK scrollbars enabled, execution stops many times: Breakpoint 19, cancel_mouse_face (f=0x87349c8) at /data/steve/bzr/emacs/quickfixes/src/xdisp.c:27545 27545 Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); (gdb) c Continuing. At each break, a portion of the scroll bar is redisplayed. For example, after typing C-x 2, execution stops and the scroll bar vanishes. When I type c, the upper portion is redisplayed, then execution stops. Next c, the upper scroll bar vanishes but the lower one is redisplayed, then execution stops. Then the upper scroll bar is redisplayed again, completing the window splitting, and the execution returns to the command loop. However, throughout this process, as long as the mouse pointer remains over the mouse-face propertized text, it remains highlighted. Likewise after Fdelete_other_windows_internal. Steve Berman