XI2 SD grabs
Peter Hutterer
peter.hutterer at who-t.net
Sat Jul 25 18:01:03 PDT 2009
On Sun, Jul 26, 2009 at 01:20:56AM +0200, Thomas Jaeger wrote:
> Sorry for bringing this up so late, I hadn't noticed this earlier
> because easystroke is still causing mysterious server crashes. In commit
> 0c0ef42292f4c910c73b308cd75d77637312da53, you removed the code that was
> responsible for detaching slave devices when a grab was activated to
> bring things more in line with how XI1 grabs worked. I'd argue that the
> old XI2 way was the right way to go about things and that sending core
> events during XI2 grabs is less than ideal: The point of XI2 grabs is
> to get complete control over the device; if other clients should still
> receive events, it would suffice to select for events. It is very
> difficult right now for the grabbing client to ensure that other clients
> don't receive any core events, at least in the case of passive grabs and
> probably inherently racy.
>
> I don't understand why gimp thinks it needs device grabs at all, but if
> compatibility is an issue, I think it would be better to treat XI1 and
> XI2 grabs differently and only detach the device for the latter.
Just to clarify, it's not actually gimp, it's GTK.
anyway. grabs are mainly to ensure event delivery from a device is
guaranteed to exactly one client. Up until server 1.4 this meant that if you
had a device grabbed, no-one else would get events from this device (afaik
anyway). Since 1.4 the behaviour has already changed. A device that sends
core events will send core events even if it is grabbed.
Detaching a slave device during a grab constitutes a quite significant
change in behaviour, and perhaps unnecessary so. I reverted the change
simply because clients have a long inertia and breaking the behaviour (even
if the protocol doesn't specify it) is problematic.
Now, the question is - what is your exact use-case and can it be solved
without detaching the devices?
Cheers,
Peter
More information about the xorg-devel
mailing list