From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org, darren.hoo@gmail.com
Subject: Re: Input for TTY menus
Date: Fri, 18 Oct 2013 18:28:28 +0300 [thread overview]
Message-ID: <83ppr2mwdf.fsf@gnu.org> (raw)
In-Reply-To: <jwviowufwqo.fsf-monnier+emacs@gnu.org>
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: darren.hoo@gmail.com, emacs-devel@gnu.org
> Date: Fri, 18 Oct 2013 11:12:51 -0400
>
> > 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.
Instead of clicking "Edit" on the menu bar, I clicked C-mouse-3 on the
text area of a buffer that is in Fundamental mode; that pops up the
"Edit" menu. The complete trace is this:
<C-mouse-3> <mouse-movement> <mouse-movement> <down-mouse-1>
<goto> <mouse-1> <down-mouse-1> <go-to-line> <mouse-1>
> > 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?
I call discard_mouse_events.
> Also, isn't it possible that you have not yet released the mouse button
> when you try to remove those mouse events?
Could be.
> > 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.
I will see what I can do, thanks.
> 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).
Why is that?
next prev parent reply other threads:[~2013-10-18 15:28 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-19 13:38 Input for TTY menus Eli Zaretskii
2013-09-19 13:52 ` Masatake YAMATO
2013-09-19 14:33 ` Stefan Monnier
2013-09-19 15:47 ` Eli Zaretskii
2013-09-19 19:21 ` Stefan Monnier
2013-09-23 13:18 ` Eli Zaretskii
2013-09-23 14:43 ` Stefan Monnier
2013-09-21 14:56 ` Eli Zaretskii
2013-10-17 5:34 ` Darren Hoo
2013-10-17 15:49 ` Eli Zaretskii
2013-10-18 4:55 ` Darren Hoo
2013-10-18 6:49 ` Eli Zaretskii
2013-10-18 7:37 ` Darren Hoo
2013-10-18 9:13 ` Eli Zaretskii
2013-10-18 10:39 ` Darren Hoo
2013-10-18 13:38 ` Eli Zaretskii
2013-10-18 13:40 ` Eli Zaretskii
2013-10-19 18:38 ` Darren Hoo
2013-10-19 18:58 ` Darren Hoo
2013-10-19 19:07 ` Darren Hoo
2013-10-20 9:32 ` Jan Djärv
2013-10-18 14:11 ` Eli Zaretskii
2013-10-18 15:12 ` Stefan Monnier
2013-10-18 15:28 ` Eli Zaretskii [this message]
2013-10-18 18:17 ` Stefan Monnier
2013-10-19 8:40 ` Eli Zaretskii
2013-10-19 13:45 ` Stefan Monnier
2013-10-18 17:41 ` chad
2013-10-18 17:43 ` chad
2013-10-18 18:14 ` Eli Zaretskii
2013-10-18 19:26 ` Jan Djärv
2013-10-18 20:04 ` Stefan Monnier
2013-10-19 7:35 ` Eli Zaretskii
2013-10-19 9:43 ` Eli Zaretskii
2013-10-19 13:40 ` Stefan Monnier
2013-10-19 14:45 ` Eli Zaretskii
2013-10-19 15:25 ` Stefan Monnier
2013-10-19 16:32 ` Eli Zaretskii
2013-10-19 8:58 ` Jan Djärv
2013-10-19 9:01 ` 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=83ppr2mwdf.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=darren.hoo@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.