summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2008-12-03 13:33:13 -0500
committerAdam Jackson <ajax@redhat.com>2008-12-03 13:33:13 -0500
commitc25389a1b5cb5cb513eb9486aca4df0d53d089df (patch)
tree1e93a502753feb7aebde15360b6c3fbdbb0d8544
parent5d5e4cff8c69d36d10e682d59c9a9005a8b5ad18 (diff)
downloadxorg-proto-randrproto-c25389a1b5cb5cb513eb9486aca4df0d53d089df.tar.gz
Define primary output requests.
-rw-r--r--randr.h4
-rw-r--r--randrproto.h26
-rw-r--r--randrproto.txt72
3 files changed, 98 insertions, 4 deletions
diff --git a/randr.h b/randr.h
index 87cd4a8..8dc7a50 100644
--- a/randr.h
+++ b/randr.h
@@ -44,7 +44,7 @@ typedef unsigned long XRandrModeFlags;
#define RRNumberErrors 3
#define RRNumberEvents 2
-#define RRNumberRequests 28
+#define RRNumberRequests 30
#define X_RRQueryVersion 0
/* we skip 1 to make old clients fail pretty immediately */
@@ -82,6 +82,8 @@ typedef unsigned long XRandrModeFlags;
#define X_RRGetScreenResourcesCurrent 25
#define X_RRSetCrtcTransform 26
#define X_RRGetCrtcTransform 27
+#define X_RRSetOutputPrimary 28
+#define X_RRGetOutputPrimary 29
#define RRTransformUnit (1L << 0)
#define RRTransformScaleUp (1L << 1)
diff --git a/randrproto.h b/randrproto.h
index f8aac94..2a7f3c1 100644
--- a/randrproto.h
+++ b/randrproto.h
@@ -631,6 +631,32 @@ typedef struct {
#define sz_xRRGetCrtcTransformReply 96
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ Window window B32;
+ RROutput output B32;
+} xRRSetOutputPrimaryReq;
+#define sz_xRRSetOutputPrimaryReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ Window window B32;
+} xRRGetOutputPrimaryReq;
+#define sz_xRRGetOutputPrimaryReq 8
+
+typedef struct {
+ BYTE type;
+ CARD8 pad;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ RROutput output B32;
+} xRRGetOutputPrimaryReply;
+#define sz_xRRGetOutputPrimaryReply 12
+
/*
* event
*/
diff --git a/randrproto.txt b/randrproto.txt
index fb52497..e3b1f66 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -1059,6 +1059,50 @@ This request returns the pending and current transforms for the specified
CRTC. The pending transform will be the same as the current transform if no
new pending transform has been set since the last call to RRSetCrtcConfig.
+┌───
+ RRSetOutputPrimary
+ window: WINDOW
+ output: OUTPUT
+└───
+ Errors: Match, Output, Window
+
+ RRSetOutputPrimary marks 'output' as the primary output for the
+ screen with the same root window as 'window'. This output's CRTC
+ will be sorted to the front of the list in Xinerama and RANDR
+ geometry requests for the benefit of older applications. The
+ default primary output is None, and None is a legal value to pass
+ to RRSetOutputPrimary. This request is expected to be used by
+ desktop environments to mark the screen that should hold the primary
+ menu bar or panel.
+
+ If the named output is not connected to any CRTC, BadMatch is
+ generated.
+
+ As this changes the logical layout of the screen, ConfigureNotify
+ and RRScreenChangeNotify will be generated on the appropriate root
+ window when the primary output is changed by this call. This request
+ also generates RROutputChangeNotify events on the outputs that gained
+ and lost primary status.
+
+ If an output is disconnected asynchronously (eg. due to recabling),
+ the primary status does not change, but RROutputChangeNotify events
+ will be generated if the hardware is capable of detecting this;
+ clients are expected to reconfigure if appropriate.
+
+ If an output is deleted (eg. due to device hotplug), the server will
+ act as though None was passed to RRSetOutputPrimary, including
+ generating the appropriate events.
+
+┌───
+ RRGetOutputPrimary
+ window: WINDOW
+ ▶
+ output: OUTPUT
+└───
+ Errors: Window
+
+ RRGetOutputPrimary returns the primary output for the system.
+
❧❧❧❧❧❧❧❧❧❧❧
8. Extension Events
@@ -1226,7 +1270,7 @@ list of what each version provided:
modes
1.3: Added cheap version of RRGetScreenResources. Added CRTC
- transformations.
+ transformations. Added concept of primary output.
Compatibility between 0.0 and 1.0 was *NOT* preserved, and 0.0 clients
will fail against 1.0 servers. The wire encoding op-codes were
@@ -1235,8 +1279,8 @@ graceful way. Version 1.1 servers and clients are cross compatible with
1.0. Version 1.1 is considered to be stable and we intend upward
compatibility from this point. Version 1.2 offers an extended model of the
system with multiple output support. Version 1.3 adds a cheap version of
-GetScreenResources to avoid expensive DDC operations, and CRTC
-transformations. 1.2 and 1.3 are backward-compatible with 1.1.
+GetScreenResources to avoid expensive DDC operations, CRTC transformations
+and the primary output concept. 1.2 and 1.3 are backward-compatible with 1.1.
❧❧❧❧❧❧❧❧❧❧❧
@@ -1851,6 +1895,28 @@ A.2.2 Protocol Requests added with version 1.3
4*cf FIXED current filter params
└───
+┌───
+ RRSetOutputPrimary
+ 1 CARD8 major opcode
+ 1 28 RandR opcode
+ 2 3 length
+ 4 WINDOW window
+ 4 OUTPUT output
+└───
+
+┌───
+ RRGetOutputPrimary
+ 1 CARD8 major opcode
+ 1 29 RandR opcode
+ 2 2 length
+ 4 WINDOW window
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 OUTPUT output
+└───
+
A.3 Protocol Events
┌───