[PATCH weston] input: don't send to clients key events eaten by bindings

Jasper St. Pierre jstpierre at mecheye.net
Thu Nov 13 09:30:57 PST 2014

On Thu, Nov 13, 2014 at 3:30 AM, Daniel Stone <daniel at fooishbar.org> wrote:

> Hi,
> On Thursday, November 13, 2014, Giulio Camuffo <giuliocamuffo at gmail.com>
> wrote:
>> 2014-11-13 12:06 GMT+02:00 Daniel Stone <daniel at fooishbar.org>:
>> > But this is just a client issue, and nothing in sending the full keys
>> array
>> > precludes this working.
>> >
>> > If Alt+X is a modifier (i.e. any time Alt+X is held, pressing Y
>> triggers the
>> > shortcut), then the client can use the keys array to notice this, and
>> ensure
>> > the shortcut is fired.
>> >
>> > If Alt+(X+Y) is a cumulative shortcut, then the client knows from
>> seeing X
>> > in the enter array but not a key event, that it must wait for a release
>> on X
>> > before it arms the shortcut for Y.
>> But no, because, when the focus isn't switched, there is no enter
>> event and no keys array. The client has no idea X was pressed, so it
>> can't possibly trigger the binding.
>> So without the patch this is not consistent. Depending on whether the
>> compositor binding switches the focus, the client binding works or it
>> doesn't work.
> A problem we can solve by switching the focus. ;) I agree that it's
> annoying to always do this for every hotkey, so we could introduce a new
> wl_keyboard::leave_temporary which would inform the client that it's about
> to get another enter event very shortly, but shouldn't redraw itself
> insensitive or anything.

wl_keyboard::leave should never affect the the window visibly. That's what
the state in xdg-shell is for.

> Alternately, we could bump the wl_keyboard version to just allow for
> consecutive enter events and never send a leave in these temporal cases.
> For older clients, we can just send leave/enter and they can suck it up.
> Either way, it makes things more predictable and allows clients to work
> out what's best.
> Cheers,
> Daniel
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20141113/499095e6/attachment-0001.html>

More information about the wayland-devel mailing list