[Top][All Lists]

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

Re: Input for TTY menus

From: Stefan Monnier
Subject: Re: Input for TTY menus
Date: Fri, 18 Oct 2013 11:12:51 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> This seems to happen because Emacs sees both down-mouse-1 and mouse-1
> events, and the latter causes us to switch out of the minibuffer
> window.  Here's what "C-h l" shows:

>   <down-mouse-1> <goto> <mouse-1> <down-mouse-1> <go-to-line> <mouse-1>

Can you describe what you did?  AFAICT, you clicked on "Edit" first, and
then in the end you clicked on "Goto line...", and I gues in the middle
you clicked on "Go To".  Not sure why we only see 2 clicks above.

> What I don't understand is why is the mouse-1 click visible after the
> menu is popped down.  The menu code in term.c removes all the mouse
> events in the event queue before returning the event to its caller,

Which event queue?
Also, isn't it possible that you have not yet released the mouse button
when you try to remove those mouse events?

> and on top of that, menu-bar.el binds mouse-1 to tty-menu-ignore.

But only while the menu is displayed.  After selecting "Goto line..."
(which seems to happen on the down-mouse-1 event) you pop down the menu
and you don't use the special map any more.

You might like to change the way your menus work so that it is the
up-mouse (i.e. mouse-1) which performs the action and the down-mouse
which are ignored.

Of course, the first up-mouse event should be ignored if it happens very
soon after the menu was popped up (and at about the same place as the
down-mouse that triggered the menu).


reply via email to

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