[PATCH xserver 16/17] Input: Add initial multitouch support from Xi 2.1
daniel at fooishbar.org
Wed Jan 19 07:19:21 PST 2011
On Fri, Jan 07, 2011 at 12:39:48PM -0500, Chase Douglas wrote:
> On 01/07/2011 10:57 AM, Daniel Stone wrote:
> > On Thu, Jan 06, 2011 at 02:30:07PM -0500, Chase Douglas wrote:
> >> Maybe we should prohibit XIAllMasterDevices and any slave device
> >> selection at the same time, just as is done for XIAllDevices?
> > That would prevent anyone from ever receiving touch events for a
> > floating direct touch device if someone had an XIAllMasterDevices grab.
> > I've been thinking about just allowing both grabs and selections on
> > different devices (e.g. allowing them on all of the SD, the MD, all MDs,
> > and all devices), and using the most specific one for delivery. So,
> > first check a grab on the specific SD, then the specific MD, then all
> > MDs, then all devices.
> > At the moment, I can't think of how to manage the floating -> attached
> > corner case in that comment (i.e. when you have a grab on a floating
> > device which later becomes attached to an MD that also has a touch grab,
> > or if there's an AllMasterDevices touch grab), so I'm inclined to not
> > pretend we can always ensure exclusive access.
> I want to ensure that whatever we do, we fall on the side of emitting
> events only to one owning client at a time.
Yep, I agree, and I can't see that the current code violates that
> I wonder if maybe we should instead cause an attachment to fail if it
> would break exclusivity here. With an appropriate error code the
> requesting client would understand what's going on. It's a bit of a
> kludge though, since XI 2.0 clients may get an error they don't
> understand. In reality, this corner case shouldn't come up too often, so
> maybe the kludge would be acceptable?
Hm, I really don't like emitting non-obvious errors though, especially
as pointer reconfiguration would be done via things like a desktop
environment control panel, or a dumb client like xinput. Especially if
an application has long-running grabs, the solution would be to close
all your applications or even restart the X server, in order to change
your device hierachy. That doesn't sound too pleasant.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the xorg-devel