[PATCH inputproto 2/4] XI2.1: Add confine_to to XIGrabDevice.

Peter Hutterer peter.hutterer at who-t.net
Mon Jun 6 18:37:19 PDT 2011


On Mon, Jun 06, 2011 at 12:53:33PM +0100, Daniel Stone wrote:
> Hi,
> 
> On Thu, Jun 02, 2011 at 05:13:28PM +1000, Peter Hutterer wrote:
> > +If the client supports XI 2.1 and confine_to is not None and the device is a
> > +master pointer device, the cursor will be confined to that window.
> 
> If the device is an SD, won't its motion also be confined? As far as I
> can tell, we call ConfineCursorToWindow pretty unconditionally, and it
> does look like it would get clipped ...

this is the inputproto patch, so the server behaviour doesn't necessarily
matter here (also, i just found the server crashes if you try to confine_to
a floating slave ;)

Anyway. Currently, slave devices are _not_ confined to a window. This
isn't directly documented but simply explained - confine_to previously only
existed on core requests, so only master pointers could be confined by a
client, for all others confine_to was None.
And a side effect I just noticed is that the XI2 valuator range is
confined proportionately as well, that shouldn't happen IMO.

It makes sense to confine floating slaves, there may be use-cases (gimp
map-to-canvas?). attached slaves are detached on a direct grab anyway.
I'll try to get out more patches then.

Cheers,
  Peter


More information about the xorg-devel mailing list