proto/randrproto: Branch 'master' - 6 commits

Matthias Hopf mhopf at kemper.freedesktop.org
Thu Dec 4 09:34:56 PST 2008


 configure.ac   |    2 
 randr.h        |    4 +
 randrproto.h   |   64 ++++++++++++++++++++++++
 randrproto.txt |  152 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 4 files changed, 219 insertions(+), 3 deletions(-)

New commits:
commit 19a851fc85192906586138c5b17740ba28328eaa
Author: Matthias Hopf <mhopf at suse.de>
Date:   Thu Dec 4 15:45:23 2008 +0100

    Bump to 1.2.99.2

diff --git a/configure.ac b/configure.ac
index d4aeffb..e7398d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ([2.57])
-AC_INIT([RandrProto], [1.2.99.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AC_INIT([RandrProto], [1.2.99.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 
 XORG_RELEASE_VERSION
commit fb1f243716282f442235323834fec50aab7fe2f7
Author: Matthias Hopf <mhopf at suse.de>
Date:   Thu Dec 4 15:44:12 2008 +0100

    Nuke config-timestamp for panning. Specifying panning update on screen size change.

diff --git a/randrproto.h b/randrproto.h
index 324455e..11143c5 100644
--- a/randrproto.h
+++ b/randrproto.h
@@ -705,9 +705,8 @@ typedef struct {
     CARD8	randrReqType;
     CARD16	length B16;
     RRCrtc	crtc B32;
-    Time	configTimestamp B32;
 } xRRGetPanningReq; 
-#define sz_xRRGetPanningReq		12
+#define sz_xRRGetPanningReq		8
 
 typedef struct {
     BYTE	type;
@@ -736,7 +735,6 @@ typedef struct {
     CARD16	length B16;
     RRCrtc	crtc B32;
     Time	timestamp B32;
-    Time    	configTimestamp B32;
     CARD16	left B16;
     CARD16	top B16;
     CARD16	width B16;
@@ -750,7 +748,7 @@ typedef struct {
     INT16	border_right B16;
     INT16	border_bottom B16;
 } xRRSetPanningReq; 
-#define sz_xRRSetPanningReq		40
+#define sz_xRRSetPanningReq		36
 
 typedef struct {
     BYTE	type;
diff --git a/randrproto.txt b/randrproto.txt
index 1d248e1..5244379 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -508,12 +508,11 @@ dynamic changes in the display environment.
 	extension and the core protocol. They must be non-zero, or Value
 	error results.
 
-	Note that changes to the screen size might invalidate panning
-	parameters.  In these cases panning might be silently disabled, or the
-	panning parameters are updated automatically as necessary.  The exact
-	behavior of the implementation is undefined.  If the panning parameters
-	do not conflict with new screen size, panning remains enabled
-	unchanged.
+	If panning is enabled, the width and height of the panning and the
+	tracking areas are adapted to the new size and clamped afterwards.
+	Disabled panning axes remain disabled.
+	Panning borders are disabled if their requirements are no longer met
+	(see RRSetPanning).
 
 ┌───
     RRGetScreenResources
@@ -945,11 +944,11 @@ dynamic changes in the display environment.
 	then re-enabling the CRTC at the new configuration to avoid an
 	invalid intermediate configuration.
 
-	Note that changes to the CRTC might invalidate panning parameters.  In
-	these cases panning might be silently disabled, or the panning
-	parameters are updated automatically as necessary.  The exact behavior
-	of the implementation is undefined.  If the panning parameters do not
-	conflict with new CRTC parameters, panning remains enabled unchanged.
+	If panning is enabled, the width and height of the panning and the
+	tracking areas are clamped to the new mode size.
+	Disabled panning axes remain disabled.
+	Panning borders are disabled if their requirements are no longer met
+	(see RRSetPanning).
 
 	When this request succeeds, 'status' contains Success and the
 	requested changes to configuration will have been made.
@@ -1077,7 +1076,6 @@ dynamic changes in the display environment.
 ┌───
     RRGetPanning
 	crtc: CRTC
-	config-timestamp: TIMESTAMP
       â–¶
 	status: RRCONFIGSTATUS
 	timestamp: TIMESTAMP
@@ -1093,11 +1091,6 @@ dynamic changes in the display environment.
 	RRGetPanning returns information about the currently set panning
 	configuration for the specified crtc.
 
-	If 'config-timestamp' does not match the current configuration
-	timestamp (as returned by RRGetScreenResources), 'status' is set to
-	InvalidConfigTime and the remaining reply data is empty. Otherwise,
-	'status' is set to Success.
-
 	'timestamp' indicates when the configuration was last set.
 
 	All other entries are explained for RRSetPanning.
@@ -1106,7 +1099,6 @@ dynamic changes in the display environment.
     RRSetPanning
 	crtc: CRTC
 	timestamp: TIMESTAMP
-	config-timestamp: TIMESTAMP
 	left, top, width, height: CARD16
 	track_left, track_top, track_width, track_height: CARD16
 	border_left, border_top, border_right, border_bottom: INT16
@@ -1116,23 +1108,23 @@ dynamic changes in the display environment.
 └───
 	Errors: Crtc, Match
 
+	This request sets the panning parameters.  As soon as panning is
+	enabled, the CRTC position can change with every pointer move.
+	RRCrtcChangeNotify events are sent to the clients requesting those.
+
 	If 'timestamp' is less than the time when the configuration was last
 	successfully set, the request is ignored and InvalidTime returned in
 	status.
-	
-	If 'config-timestamp' is not equal to when the CRTC's configuration
-	last changed, the request is ignored and InvalidConfigTime returned in
-	status. This could occur if the CRTC changed since you last made a
-	RRGetCrtcInfo request, perhaps by setting a different mode.  Rather
-	than allowing an incorrect call to be executed based on stale data,
-	the server will ignore the request.
 
 	'left', 'top', 'width', and 'height' contain the total panning area
-	for this CRTC.  'width' has to be larger than the CRTC's width, and
-	'left'+'width' must be within the screen size, else a Match error
-	results.  Equivalent restrictions for the height exist.  The exception
-	is 'width' == 'height' == 0 which indicates that panning should be
-	disabled.
+	for this CRTC.  'width' has to be larger than or equal to the CRTC's
+	width or 0, and 'left'+'width' must be within the screen size, else a
+	Match error results.  Equivalent restrictions for the height exist.
+	'width' or 'height' set to 0 indicate that panning should be disabled
+	on the according axis.  Setting 'width'/'height' to the CRTC's
+	width/height will disable panning on the X/Y axis as well, but
+	RRSetScreenSize will silently enable panning if the screen size is
+	increased. This does not happen if set to 0.
 
 	'track_left', 'track_top', 'track_width', and 'track_height' contain
 	the pointer area for which the panning region is updated.  For normal
@@ -1149,21 +1141,16 @@ dynamic changes in the display environment.
 	panning).  If the borders are positive, the screen will pan when the
 	pointer gets close to the CRTC borders, if they are negative, the
 	screen will only pan when the pointer is already way past the CRTC 
-	borders.  Negative values might confuse users and are discouraged.
+	borders.  Negative values might confuse users and disable panning to
+	the very edges of the screen.  Thus they are discouraged.
 	border_left + border_right has to be lower or equal than the CRTC's
 	width, else a Match error results.  An equivalent restriction for the
 	height exists.
 
-	This request sets the panning parameters.  As soon as panning is
-	enabled, the CRTC position can change with every pointer move.
-	RRCrtcChangeNotify events are sent to the clients requesting those.
-
-	Note that changes to the CRTC or screen might invalidate panning
-	parameters.  In these cases panning might be silently disabled, or the
-	panning parameters are updated automatically as necessary.  The exact
-	behavior of the implementation is undefined.  If the panning parameters
-	do not conflict with new CRTC parameters or screen size, panning
-	remains enabled unchanged.
+	Screen size changes update the panning and the tracking areas to the
+	new size. Both screen size changes and mode changes clamp these areas
+	to the current CRTC size.  In these cases panning borders are disabled
+	if their requirements are no longer met.
 
 	When this request succeeds, 'status' contains Success and the
 	requested changes to configuration will have been made.
@@ -1967,9 +1954,8 @@ A.2.2 Protocol Requests added with version 1.3
     RRGetPanning
 	1	CARD8			major opcode
 	1	28			RandR opcode
-	2	3			length
+	2	2			length
 	4	CRTC			crtc
-	4	TIMESTAMP		config-timestamp
       â–¶
 	1	1			Reply
 	1	RRCONFIGSTATUS		status
@@ -1993,10 +1979,9 @@ A.2.2 Protocol Requests added with version 1.3
     RRSetPanning
 	1	CARD8			major opcode
 	1	29			RandR opcode
-	2	10			length
+	2	9			length
 	4	CRTC			crtc
 	4	TIMESTAMP		timestamp
-	4	TIMESTAMP		config-timestamp
 	2	CARD16			left
 	2	CARD16			top
 	2	CARD16			width
commit 425468e9a29071823316bfc027bc80eb20acc61e
Author: Matthias Hopf <mhopf at suse.de>
Date:   Thu Dec 4 12:57:33 2008 +0100

    Add panning to versioning information.

diff --git a/randrproto.txt b/randrproto.txt
index d92b814..1d248e1 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -1338,7 +1338,7 @@ list of what each version provided:
 	     modes
 
 	1.3: Added cheap version of RRGetScreenResources.  Added CRTC
-	     transformations.
+	     transformations.  Added panning.
 
 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
commit 419a0f20746d9f3e8962ea3294568343d9877b2c
Author: Matthias Hopf <mhopf at suse.de>
Date:   Fri Nov 28 18:30:22 2008 +0100

    Panning protocol bits description

diff --git a/randrproto.txt b/randrproto.txt
index 5ebbcd9..d92b814 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -1963,6 +1963,61 @@ A.2.2 Protocol Requests added with version 1.3
 	4*cf	FIXED			current filter params
 └───
     
+┌───
+    RRGetPanning
+	1	CARD8			major opcode
+	1	28			RandR opcode
+	2	3			length
+	4	CRTC			crtc
+	4	TIMESTAMP		config-timestamp
+      â–¶
+	1	1			Reply
+	1	RRCONFIGSTATUS		status
+	2	CARD16			sequence number
+	4	1			reply length
+	4	TIMESTAMP		timestamp
+	2	CARD16			left
+	2	CARD16			top
+	2	CARD16			width
+	2	CARD16			height
+	2	CARD16			track_left
+	2	CARD16			track_top
+	2	CARD16			track_width
+	2	CARD16			track_height
+	2	INT16			border_left
+	2	INT16			border_top
+	2	INT16			border_right
+	2	INT16			border_bottom
+└───
+┌───
+    RRSetPanning
+	1	CARD8			major opcode
+	1	29			RandR opcode
+	2	10			length
+	4	CRTC			crtc
+	4	TIMESTAMP		timestamp
+	4	TIMESTAMP		config-timestamp
+	2	CARD16			left
+	2	CARD16			top
+	2	CARD16			width
+	2	CARD16			height
+	2	CARD16			track_left
+	2	CARD16			track_top
+	2	CARD16			track_width
+	2	CARD16			track_height
+	2	INT16			border_left
+	2	INT16			border_top
+	2	INT16			border_right
+	2	INT16			border_bottom
+      â–¶
+	1	1			Reply
+	1	RRCONFIGSTATUS		status
+	2	CARD16			sequence number
+	4	0			reply length
+	4	TIMESTAMP		new timestamp
+	20				unused
+└───
+
 A.3 Protocol Events
 
 ┌───
commit 6b5d4ce8943c1d39392a0536d426fe27a9161b04
Author: Matthias Hopf <mhopf at suse.de>
Date:   Fri Nov 28 18:29:19 2008 +0100

    Panning protocol description

diff --git a/randrproto.txt b/randrproto.txt
index b23e415..5ebbcd9 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -508,6 +508,13 @@ dynamic changes in the display environment.
 	extension and the core protocol. They must be non-zero, or Value
 	error results.
 
+	Note that changes to the screen size might invalidate panning
+	parameters.  In these cases panning might be silently disabled, or the
+	panning parameters are updated automatically as necessary.  The exact
+	behavior of the implementation is undefined.  If the panning parameters
+	do not conflict with new screen size, panning remains enabled
+	unchanged.
+
 ┌───
     RRGetScreenResources
 	window: WINDOW
@@ -938,6 +945,12 @@ dynamic changes in the display environment.
 	then re-enabling the CRTC at the new configuration to avoid an
 	invalid intermediate configuration.
 
+	Note that changes to the CRTC might invalidate panning parameters.  In
+	these cases panning might be silently disabled, or the panning
+	parameters are updated automatically as necessary.  The exact behavior
+	of the implementation is undefined.  If the panning parameters do not
+	conflict with new CRTC parameters, panning remains enabled unchanged.
+
 	When this request succeeds, 'status' contains Success and the
 	requested changes to configuration will have been made.
 	
@@ -1061,6 +1074,103 @@ dynamic changes in the display environment.
 	transform if no new pending transform has been set since the last call
 	to RRSetCrtcConfig.
 
+┌───
+    RRGetPanning
+	crtc: CRTC
+	config-timestamp: TIMESTAMP
+      â–¶
+	status: RRCONFIGSTATUS
+	timestamp: TIMESTAMP
+	left, top, width, height: CARD16
+	track_left, track_top, track_width, track_height: CARD16
+	border_left, border_top, border_right, border_bottom: INT16
+└───
+
+	Errors: Crtc
+
+	Version 1.3 adds panning support again. If multiple crtcs are active
+	the panning behavior can be defined per crtc individually.
+	RRGetPanning returns information about the currently set panning
+	configuration for the specified crtc.
+
+	If 'config-timestamp' does not match the current configuration
+	timestamp (as returned by RRGetScreenResources), 'status' is set to
+	InvalidConfigTime and the remaining reply data is empty. Otherwise,
+	'status' is set to Success.
+
+	'timestamp' indicates when the configuration was last set.
+
+	All other entries are explained for RRSetPanning.
+
+┌───
+    RRSetPanning
+	crtc: CRTC
+	timestamp: TIMESTAMP
+	config-timestamp: TIMESTAMP
+	left, top, width, height: CARD16
+	track_left, track_top, track_width, track_height: CARD16
+	border_left, border_top, border_right, border_bottom: INT16
+      â–¶
+	status: RRCONFIGSTATUS
+	new-timestamp: TIMESTAMP
+└───
+	Errors: Crtc, Match
+
+	If 'timestamp' is less than the time when the configuration was last
+	successfully set, the request is ignored and InvalidTime returned in
+	status.
+	
+	If 'config-timestamp' is not equal to when the CRTC's configuration
+	last changed, the request is ignored and InvalidConfigTime returned in
+	status. This could occur if the CRTC changed since you last made a
+	RRGetCrtcInfo request, perhaps by setting a different mode.  Rather
+	than allowing an incorrect call to be executed based on stale data,
+	the server will ignore the request.
+
+	'left', 'top', 'width', and 'height' contain the total panning area
+	for this CRTC.  'width' has to be larger than the CRTC's width, and
+	'left'+'width' must be within the screen size, else a Match error
+	results.  Equivalent restrictions for the height exist.  The exception
+	is 'width' == 'height' == 0 which indicates that panning should be
+	disabled.
+
+	'track_left', 'track_top', 'track_width', and 'track_height' contain
+	the pointer area for which the panning region is updated.  For normal
+	use cases it should enclose the panning area minus borders, and is
+	typically set to either the panning area minus borders, or to the
+	total screen size. If set to the total screen size, the CRTC will pan
+	in the remaining axis even if the pointer is outside the panning area
+	on a different CRTC.
+
+	'border_left', 'border_top', 'border_right', and 'border_bottom'
+	define the distances from the CRTC borders that will activate panning
+	if the pointer hits them.  If the borders are 0, the screen will pan
+	when the pointer hits the CRTC borders (behavior of pre-RandR Xserver
+	panning).  If the borders are positive, the screen will pan when the
+	pointer gets close to the CRTC borders, if they are negative, the
+	screen will only pan when the pointer is already way past the CRTC 
+	borders.  Negative values might confuse users and are discouraged.
+	border_left + border_right has to be lower or equal than the CRTC's
+	width, else a Match error results.  An equivalent restriction for the
+	height exists.
+
+	This request sets the panning parameters.  As soon as panning is
+	enabled, the CRTC position can change with every pointer move.
+	RRCrtcChangeNotify events are sent to the clients requesting those.
+
+	Note that changes to the CRTC or screen might invalidate panning
+	parameters.  In these cases panning might be silently disabled, or the
+	panning parameters are updated automatically as necessary.  The exact
+	behavior of the implementation is undefined.  If the panning parameters
+	do not conflict with new CRTC parameters or screen size, panning
+	remains enabled unchanged.
+
+	When this request succeeds, 'status' contains Success and the
+	requested changes to configuration will have been made.
+
+	'new-time-stamp' contains the time at which this request was
+	executed.
+
                               ❧❧❧❧❧❧❧❧❧❧❧
 
 8. Extension Events
commit abe956221670598a5fd0f77107a3471c2fcf84df
Author: Matthias Hopf <mhopf at suse.de>
Date:   Fri Nov 28 17:22:23 2008 +0100

    Panning protocol extension

diff --git a/randr.h b/randr.h
index 87cd4a8..92f2fb6 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_RRGetPanning		    28
+#define X_RRSetPanning		    29
 
 #define RRTransformUnit		    (1L << 0)
 #define RRTransformScaleUp	    (1L << 1)
diff --git a/randrproto.h b/randrproto.h
index f8aac94..324455e 100644
--- a/randrproto.h
+++ b/randrproto.h
@@ -700,6 +700,72 @@ typedef struct {
 } xRROutputPropertyNotifyEvent;
 #define sz_xRROutputPropertyNotifyEvent	32
 
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RRCrtc	crtc B32;
+    Time	configTimestamp B32;
+} xRRGetPanningReq; 
+#define sz_xRRGetPanningReq		12
+
+typedef struct {
+    BYTE	type;
+    CARD8	status;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    Time	timestamp B32;
+    CARD16	left B16;
+    CARD16	top B16;
+    CARD16	width B16;
+    CARD16	height B16;
+    CARD16	track_left B16;
+    CARD16	track_top B16;
+    CARD16	track_width B16;
+    CARD16	track_height B16;
+    INT16	border_left B16;
+    INT16	border_top B16;
+    INT16	border_right B16;
+    INT16	border_bottom B16;
+} xRRGetPanningReply;
+#define sz_xRRGetPanningReply		36
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RRCrtc	crtc B32;
+    Time	timestamp B32;
+    Time    	configTimestamp B32;
+    CARD16	left B16;
+    CARD16	top B16;
+    CARD16	width B16;
+    CARD16	height B16;
+    CARD16	track_left B16;
+    CARD16	track_top B16;
+    CARD16	track_width B16;
+    CARD16	track_height B16;
+    INT16	border_left B16;
+    INT16	border_top B16;
+    INT16	border_right B16;
+    INT16	border_bottom B16;
+} xRRSetPanningReq; 
+#define sz_xRRSetPanningReq		40
+
+typedef struct {
+    BYTE	type;
+    CARD8	status;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    Time	newTimestamp B32;
+    CARD32      pad1 B32;
+    CARD32      pad2 B32;
+    CARD32      pad3 B32;
+    CARD32      pad4 B32;
+    CARD32      pad5 B32;
+} xRRSetPanningReply;
+#define sz_xRRSetPanningReply	32
+
 #undef RRModeFlags
 #undef RRCrtc
 #undef RRMode


More information about the xorg-commit mailing list