[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New Context Menu

From: Ergus
Subject: Re: New Context Menu
Date: Fri, 20 Aug 2021 14:59:26 +0200

On Fri, Aug 20, 2021 at 03:36:33PM +0300, Eli Zaretskii wrote:
Date: Fri, 20 Aug 2021 14:26:05 +0200
From: Ergus <spacibba@aol.com>
Cc: Juri Linkov <juri@linkov.net>, emacs-devel@gnu.org

>> I don't understand how the behavior of the context menu could be
>> different from the behavior of the old binding [C-down-mouse-3]
>> when both have the same implementation.
>I cannot say I understand that in detail, either, but the fact is it
>does.  Maybe it's translation from C-down-mouse-3 to C-mouse-3?
No. C-down-mouse-3 is a modified mouse event; emacs gets it but not the
equivalent up events (C-up-mouse-3 for example) but it gets somehow the
up-mouse-3 event.

There's no up-mouse-N events in Emacs, AFAIK.  There's only
down-mouse-N events and mouse-N events; the latter are generated when
Emacs internally sees the Nth button pressed and released.

For example:

Try C-down-mouse-3 then Release Control and after that release the mouse
button. You will see a similar issue.

What issue is that?

When you do what you describe, Emacs doesn't generate the C-mouse-3
event because it never sees the button released with the Ctrl
modifier.  This is expected and documented.

I know. But this is actually why menus behaves as Juri says with
C-down-mouse-3 but not with down-mouse-3.

Releasing the mouse button with Control hold seems not to generate any
event. While releasing it without holding control generates an event.

You can also see that in the menu, if you release the mouse button while
control is hold, the current item is not selected. But with context menu
when we release the mouse button the current item is actually selected
because control is not hold.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]