[webkit-gtk] Opening default context menu on mouse release
Adrian Perez de Castro
aperez at igalia.com
Mon May 15 13:39:50 PDT 2017
On Mon, 15 May 2017 11:15:20 -0500, Michael Catanzaro <mcatanzaro at igalia.com> wrote:
> On Sun, May 14, 2017 at 5:35 AM, Peter Hofmann
> <webkitlists at uninformativ.de> wrote:
> > Hi all,
> >
> > we're trying to implement mouse gestures[0] in a simple webkit2gtk
> > browser. To make things a little easier, here's a minimal example:
> >
> > https://gist.github.com/vain/e861bce9536410aa10d46948d6bd48c8
> >
> > To invoke a gesture, press the right mouse button and drag the pointer
> > left, right, up or down. The browser will then navigate backward,
> > forward, reload the page or open a new tab.
> >
> > The current implementation makes the context menu inaccessible.
> > Problem
> > is, the context menu always opens on mouse *down* events. At that
> > point
> > in time, we don't know yet if the user is going to perform a gesture.
> >
> > So, my question is, is there a way to open webkit's default context
> > menu
> > on mouse *release* events?
>
> I don't think so, not currently. Maybe we need to change this, since
> mouse gestures seems like an important use-case for this. Currently the
> context menu is opened on mouse down events simply because that's what
> GTK+ does. Maybe WebKit will need to diverge from GTK+'s behavior here.
The reason why GTK+ opens the menu on mousedown is to allow activating a
menu item by moving over to it (while still pressing the button after the
mouse down), and then releasing the button — as counterintuitive this may
sound, it is particularly handy with certain kinds of input devices, I use
it all the time when using my graphics tablet :-)
Cheers,
--
💻 Adrián
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20170515/0f03769c/attachment.bin>
More information about the webkit-gtk
mailing list