[PATCH 1/2] Introduce keyboard grabbing protocol for Xwayland

Pekka Paalanen ppaalanen at gmail.com
Mon Apr 3 14:47:09 UTC 2017


On Mon, 3 Apr 2017 09:47:50 -0400 (EDT)
Olivier Fourdan <ofourdan at redhat.com> wrote:

> Hi Quentin,
> 
> > I think it may be worth it to add a little safety net:
> > “Compositors are required to restrict this interface to Xwayland alone,
> > and raise a protocol error for native Wayland clients.”  
> 
> Yes, agreed, good point! But do we really need to kill a client that would dare to try to bind to the grab interface?
> 
> Right now my implementation simply ignores the bind request...

Hi,

you cannot ignore a wl_registry.bind request. Did you ever try to see
what happens? :-)

If you do not create a wl_resource when the protocol spec says "this
creates a new object", then if the client ever refers to the
non-created object, it will hopefully be automatically shot dead for
referencing a bad object id.

Furthermore, I think it also violates the object id allocation scheme,
so if the client tries to create any new object after the ignored bind
request, that would also explode.

So you might just let the client out of its misery before anything more
confusing can happen. At least you can then deliver a descriptive error
message. ;-)


As for the protocol wording, I think it should be enough to say that
compositors should restrict the interface to Xwayland. How they do that
is up to them.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170403/0c773936/attachment.sig>


More information about the wayland-devel mailing list