[PATCH] Atomic query requests
Peter Hutterer
peter.hutterer at who-t.net
Sun Mar 21 23:15:40 PDT 2010
On Fri, Mar 19, 2010 at 12:07:05PM -0400, Adam Jackson wrote:
> 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?
I'm mostly worried about the protocol, less so about the library. You could
add two calls to the library - one XI2-enabled - that then fall back onto
the same protocol request.
Not sure about the mask bits at this point but if they can't be converted we
could maybe add both core and XI2 mask to the wire and only parse one of
them?
Cheers,
Peter
More information about the xorg-devel
mailing list