[Top][All Lists]

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

Re: Input for TTY menus

From: Eli Zaretskii
Subject: Re: Input for TTY menus
Date: Fri, 18 Oct 2013 18:28:28 +0300

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden,  address@hidden
> 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?

reply via email to

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