[PATCH 1/2] Atomic query requests
Adam Jackson
ajax at redhat.com
Thu Dec 1 12:53:40 PST 2011
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
fixesproto.txt | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
xfixesproto.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++
xfixeswire.h | 7 ++++-
3 files changed, 126 insertions(+), 3 deletions(-)
diff --git a/fixesproto.txt b/fixesproto.txt
index 5903ac9..1ff442f 100644
--- a/fixesproto.txt
+++ b/fixesproto.txt
@@ -1,7 +1,7 @@
The XFIXES Extension
Version 5.0
Document Revision 1
- 2010-11-15
+ 2011-09-12
Keith Packard
keithp at keithp.com
@@ -160,6 +160,7 @@ current cursor and provides a way to identify cursor images to avoid
refetching the image each time it changes to a previously seen cursor.
7.1 Types
+
CURSOREVENT { DisplayCursor }
7.2 Events
@@ -650,6 +651,67 @@ DestroyPointerBarrier
Errors: Barrier
+************* XFIXES VERSION 6 OR BETTER ***********
+
+13. Atomic queries
+
+Some core protocol requests return information about only a few windows,
+when the application often wants information about the hierarchy all the
+way to the root. In order to get consistent information this has to be
+done under a server grab, which is impolite when the client is remote.
+
+13.1 Types
+
+ POINTERWINDOW { Window w,
+ CARD16 x,
+ CARD16 y }
+
+13.2 Requests
+
+QueryPointer
+
+ pointer: DEVICEID
+
+ ->
+
+ mask: SETofKEYBUTMASK
+ pointer_windows: LISTofPOINTERWINOW
+
+ This request returns the list of windows that contain the given
+ pointer device, from leafmost to rootmost, and the pointer'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.
+
+ 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.
+
+ Errors: Device
+
+QueryAncestors
+
+ window: WINDOW
+
+ ->
+
+ windows: LISTofWINDOW
+
+ This request returns the list of ancestors of the named window,
+ from nearest to rootmost. If the named window is a root window,
+ a zero-sized list is returned.
+
+ If the window argument does not name a defined window, BadWindow
+ is generated.
+
+ Errors: Window
+
99. Future compatibility
This extension is not expected to remain fixed. Future changes will
diff --git a/xfixesproto.h b/xfixesproto.h
index fcf409a..717cba4 100644
--- a/xfixesproto.h
+++ b/xfixesproto.h
@@ -532,6 +532,64 @@ typedef struct {
#define sz_xXFixesDestroyPointerBarrierReq 8
+/*************** Version 6.0 ******************/
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 xfixesReqType;
+ CARD16 length B16;
+ CARD16 device B16;
+ CARD16 pad1 B16;
+} xXFixesQueryPointerReq;
+
+#define sz_xXFixesQueryPointerReq sizeof(xXFixesQueryPointerReq)
+
+typedef struct {
+ Window window B32;
+ CARD16 x B16;
+ CARD16 y B16;
+} xXFixesPointerWindow;
+
+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
+
+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
+
#undef Barrier
#undef Region
#undef Picture
diff --git a/xfixeswire.h b/xfixeswire.h
index 432349a..8d2319b 100644
--- a/xfixeswire.h
+++ b/xfixeswire.h
@@ -48,7 +48,7 @@
#define _XFIXESWIRE_H_
#define XFIXES_NAME "XFIXES"
-#define XFIXES_MAJOR 5
+#define XFIXES_MAJOR 6
#define XFIXES_MINOR 0
/*************** Version 1 ******************/
@@ -89,8 +89,11 @@
/*************** Version 5 ******************/
#define X_XFixesCreatePointerBarrier 31
#define X_XFixesDestroyPointerBarrier 32
+/*************** Version 6 ******************/
+#define X_XFixesQueryPointer 33
+#define X_XFixesQueryAncestors 34
-#define XFixesNumberRequests (X_XFixesDestroyPointerBarrier+1)
+#define XFixesNumberRequests (X_XFixesQueryAncestors+1)
/* Selection events share one event number */
#define XFixesSelectionNotify 0
--
1.7.6.4
More information about the xorg-devel
mailing list