all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stephen Berman" <stephen.berman@gmx.net>
To: "Eli Zaretskii" <eliz@gnu.org>
Cc: cyd@gnu.org, 7464@debbugs.gnu.org
Subject: bug#7464: 24.0.50; mouse highlighting vanishes upon unsplitting window
Date: 31 Mar 2012 01:09:26 +0200	[thread overview]
Message-ID: <87sjgp8z4p.fsf@escher.home> (raw)
In-Reply-To: <83sjgpzus4.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 30 Mar 2012 23:41:15 +0300")

On Fri, 30 Mar 2012 23:41:15 +0300 Eli Zaretskii <eliz@gnu.org> 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





  reply	other threads:[~2012-03-30 23:09 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-22 14:57 bug#7464: 24.0.50; mouse highlighting vanishes upon unsplitting window Stephen Berman
2010-11-22 17:54 ` Eli Zaretskii
2010-11-22 19:17   ` Eli Zaretskii
2012-03-21 16:29     ` Chong Yidong
2012-03-21 17:52       ` Stephen Berman
2012-03-21 22:41         ` Stephen Berman
2012-03-22  3:55           ` Eli Zaretskii
2012-03-22 14:51             ` Stefan Monnier
2012-03-22 17:01               ` Stephen Berman
2012-03-22 17:05               ` Eli Zaretskii
2012-03-24 18:32         ` Eli Zaretskii
2012-03-24 21:46           ` Stephen Berman
2012-03-25  3:55             ` Eli Zaretskii
2012-03-25 12:57               ` Stephen Berman
2012-03-28 18:56                 ` Eli Zaretskii
2012-03-29  7:57                   ` Stephen Berman
2012-03-29 18:47                     ` Eli Zaretskii
2012-03-29 22:56                       ` Stephen Berman
2012-03-30  6:35                         ` Eli Zaretskii
2012-03-30  8:44                           ` Stephen Berman
2012-03-30  9:10                             ` Eli Zaretskii
2012-03-30 11:08                               ` Stephen Berman
2012-03-30 12:06                                 ` Eli Zaretskii
2012-03-30 19:35                                   ` Stephen Berman
2012-03-30 20:41                                     ` Eli Zaretskii
2012-03-30 23:09                                       ` Stephen Berman [this message]
2012-03-31  5:56                                         ` Eli Zaretskii
2012-03-31 14:01                                           ` Stephen Berman
2012-03-31 18:12                                             ` Eli Zaretskii
2012-03-30  7:43                       ` Jan D.
2012-03-30  8:00                         ` Eli Zaretskii
2012-03-30  8:45                           ` Stephen Berman
2012-03-30  8:57                             ` Eli Zaretskii
2012-03-30 12:20                               ` Jan Djärv
2012-03-30 12:37                           ` Stefan Monnier
2012-03-25 12:56             ` martin rudalics
2012-03-21 18:54       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sjgp8z4p.fsf@escher.home \
    --to=stephen.berman@gmx.net \
    --cc=7464@debbugs.gnu.org \
    --cc=cyd@gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.