[PATCH 1/2] Atomic query requests
Peter Hutterer
peter.hutterer at who-t.net
Mon Dec 5 01:02:48 PST 2011
On Fri, Dec 02, 2011 at 10:33:01AM +0000, Keith Packard wrote:
> On Thu, 1 Dec 2011 15:53:40 -0500, Adam Jackson <ajax at redhat.com> wrote:
>
> > + If the pointer argument is None, information for the core pointer is
> > + returned. Otherwise, if the server supports the X Input Extension
> > + version 2 or greater, the pointer argument may name any pointer
> > + device.
>
> Should this allow for keyboard devices as well and just use the
> associated pointer? There are lots of other places in the server that
> allow any device and find the right associated keyboard/pointer.
>
>
> > +typedef struct {
> > + Window window B32;
> > + CARD16 x B16;
> > + CARD16 y B16;
> > +} xXFixesPointerWindow;
>
> I bet you'll need a #define sz_ here
>
> > +typedef struct {
> > + BYTE type; /* X_Reply */
> > + BYTE pad1;
> > + CARD16 sequenceNumber B16;
> > + CARD32 length B32;
> > + CARD16 mask B16;
> > + CARD16 pad2 B16;
> > + CARD32 numWindows B32;
> > + CARD32 pad3 B32;
> > + CARD32 pad4 B32;
> > + CARD32 pad5 B32;
> > + CARD32 pad6 B32;
> > +} xXFixesQueryPointerReply;
> > +
> > +#define sz_xXFixesQueryPointerReply 32
>
> numWindows is not needed here -- you can compute it from length.
>
> > +typedef struct {
> > + CARD8 reqType;
> > + CARD8 xfixesReqType;
> > + CARD16 length B16;
> > + Window window B32;
> > +} xXFixesQueryAncestorsReq;
> > +
> > +#define sz_xXFixesQueryAncestorsReq sizeof(xXFixesQueryAncestorsReq)
> > +
> > +typedef struct {
> > + BYTE type; /* X_Reply */
> > + BYTE pad1;
> > + CARD16 sequenceNumber B16;
> > + CARD32 length B32;
> > + CARD32 numWindows B32;
> > + CARD32 pad3 B32;
> > + CARD32 pad4 B32;
> > + CARD32 pad5 B32;
> > + CARD32 pad6 B32;
> > + CARD32 pad7 B32;
> > +} xXFixesQueryAncestorsReply;
> > +
> > +#define sz_xXFixesQueryAncestorsReply 32
>
> numWindows is not needed here, it can be computed from length.
if we want to make the request extendable in the future, numWindows would be
helpful.
Cheers,
Peter
More information about the xorg-devel
mailing list