[PATCH] Atomic query requests

Adam Jackson ajax at nwnk.net
Fri Mar 19 09:07:05 PDT 2010


On Tue, 2010-03-16 at 10:56 +1000, Peter Hutterer wrote: 
> On Mon, Mar 15, 2010 at 12:06:15PM -0400, Adam Jackson wrote:
> > +QueryPointer
> > +
> > +		->
> > +
> > +		mask:			SETofKEYBUTMASK
> > +		pointer_windows:	LISTofPOINTERWINOW
> > +
> > +	This request returns the list of windows that contain the cursor,
> > +	from leafmost to rootmost, and the cursor's offset within each.
> > +	It also returns the current button mask for the pointer.
> > +
> > +	Unlike the core QueryPointer request, this does not take a root
> > +	window argument a priori; the client simply receives the cursor
> > +	state for whichever root window the cursor happens to be on.  If
> > +	the cursor is on no screen (for example, in a dead area between
> > +	screens, or owned by a native window system) a zero-sized list
> > +	is returned.
> 
> I think this one should leave room for the device ID. Gtk is being ported to
> XI2 already, so not including a device specifier is likely to bite us quite
> soon. Having said that, this makes the mask more complex as well since the
> XI2 mask usage is more verbose than the core one.

Right now Fixes only has one request with any interaction with other
extensions.  CreateRegionFromPicture will do what it says if the server
supports Render, but throw BadRequest if it doesn't.

It's certainly easy enough to add a slot to FixesQueryPointer to select
a device, and have None mean the core pointer.  I'm just not sure how to
expose that in the library API.  What I was envisioning was:

Status XFixesQueryPointer(Display *dpy, unsigned int *mask_out,
                          int *nwindow, XFixesPointerWindow **windows);

I guess you could do:

Status XFixesQueryPointer(Display *dpy, int device,
                          unsigned int *mask_out, int *nwindow,
                          XFixesPointerWindow **windows);

Where None for the device argument would be "core pointer", and you'd
just throw BadMatch if device didn't name a pointer (including if you
don't have XI).

Sound reasonable?

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100319/ef84bd59/attachment.pgp>


More information about the xorg-devel mailing list