File n_randrproto-1.6.0-2018.4.patch of Package randrproto

diff -u randrproto-1.5.0/randr.h randrproto-1.6.0/randr.h
--- randrproto-1.5.0/randr.h	2015-05-17 06:24:33.000000000 +0200
+++ randrproto-1.6.0/randr.h	2018-05-22 20:55:30.331085000 +0200
@@ -40,11 +40,11 @@
 
 #define RANDR_NAME		"RANDR"
 #define RANDR_MAJOR		1
-#define RANDR_MINOR		5
+#define RANDR_MINOR		6
 
-#define RRNumberErrors		4
+#define RRNumberErrors		5
 #define RRNumberEvents		2
-#define RRNumberRequests	45
+#define RRNumberRequests	47
 
 #define X_RRQueryVersion	0
 /* we skip 1 to make old clients fail pretty immediately */
@@ -109,6 +109,10 @@
 #define X_RRSetMonitor		      43
 #define X_RRDeleteMonitor	      44
 
+/* v1.6 */
+#define X_RRCreateLease		      45
+#define X_RRFreeLease		      46
+
 /* Event selection bits */
 #define RRScreenChangeNotifyMask  (1L << 0)
 /* V1.2 additions */
@@ -119,6 +123,8 @@
 #define RRProviderChangeNotifyMask   (1L << 4)
 #define RRProviderPropertyNotifyMask (1L << 5)
 #define RRResourceChangeNotifyMask   (1L << 6)
+/* V1.6 additions */
+#define RRLeaseNotifyMask            (1L << 7)
 
 /* Event codes */
 #define RRScreenChangeNotify	0
@@ -131,6 +137,8 @@
 #define  RRNotify_ProviderChange    3
 #define  RRNotify_ProviderProperty  4
 #define  RRNotify_ResourceChange    5
+/* V1.6 additions */
+#define  RRNotify_Lease             6
 /* used in the rotation field; rotation and reflection in 0.1 proto. */
 #define RR_Rotate_0		1
 #define RR_Rotate_90		2
@@ -172,6 +180,7 @@
 #define BadRRCrtc		1
 #define BadRRMode		2
 #define BadRRProvider		3
+#define BadRRLease		4
 
 /* Conventional RandR output properties */
 
@@ -187,6 +196,7 @@
 #define RR_PROPERTY_BORDER_DIMENSIONS	"BorderDimensions"
 #define RR_PROPERTY_GUID		"GUID"
 #define RR_PROPERTY_RANDR_TILE		"TILE"
+#define RR_PROPERTY_NON_DESKTOP		"non-desktop"
 
 /* roles this device can carry out */
 #define RR_Capability_None 0
diff -u randrproto-1.5.0/randrproto.h randrproto-1.6.0/randrproto.h
--- randrproto-1.5.0/randrproto.h	2015-05-17 06:24:33.000000000 +0200
+++ randrproto-1.6.0/randrproto.h	2018-05-22 20:55:23.194950000 +0200
@@ -50,7 +50,7 @@
 #define RRCrtc CARD32
 #define RRProvider CARD32
 #define RRModeFlags CARD32
-#define Atom CARD32
+#define RRLease CARD32
 
 #define Rotation CARD16
 #define SizeID CARD16
@@ -837,6 +837,46 @@
 #define sz_xRRGetProviderPropertyReply	32
 
 /*
+ * Additions for V1.6
+ */
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    Window	window B32;
+    RRLease	lid B32;
+    CARD16	nCrtcs B16;
+    CARD16	nOutputs B16;
+} xRRCreateLeaseReq;
+#define sz_xRRCreateLeaseReq	16
+
+typedef struct {
+    BYTE	type;
+    CARD8	nfd;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+    CARD32	pad7 B32;
+} xRRCreateLeaseReply;
+#define sz_xRRCreateLeaseReply		32
+
+typedef struct {
+    CARD8	reqType;
+    CARD8	randrReqType;
+    CARD16	length B16;
+    RRLease	lid B32;
+    BYTE	terminate;
+    CARD8	pad1;
+    CARD16	pad2 B16;
+} xRRFreeLeaseReq;
+#define sz_xRRFreeLeaseReq		12
+
+/*
  * event
  */
 typedef struct {
@@ -950,6 +990,22 @@
 #define sz_xRRResourceChangeNotifyEvent	32
 
 typedef struct {
+    CARD8 type;				/* always evBase + RRNotify */
+    CARD8 subCode;			/* RRNotify_Lease */
+    CARD16 sequenceNumber B16;
+    Time timestamp B32;			/* time resource was changed */
+    Window window B32;			/* window requesting notification */
+    RRLease lease B32;
+    CARD8 created;			/* created/deleted */
+    CARD8 pad0;
+    CARD16 pad1 B16;
+    CARD32 pad2 B32;
+    CARD32 pad3 B32;
+    CARD32 pad4 B32;
+} xRRLeaseNotifyEvent;
+#define sz_xRRLeaseNotifyEvent		32
+
+typedef struct {
     CARD8	reqType;
     CARD8	randrReqType;
     CARD16	length B16;
@@ -1091,6 +1147,5 @@
 #undef Rotation
 #undef SizeID
 #undef SubpixelOrder
-#undef Atom
 
 #endif /* _XRANDRP_H_ */
diff -u randrproto-1.5.0/randrproto.pc.in randrproto-1.6.0/randrproto.pc.in
--- randrproto-1.5.0/randrproto.pc.in	2015-05-17 06:24:33.000000000 +0200
+++ randrproto-1.6.0/randrproto.pc.in	2018-05-22 20:55:01.703541000 +0200
@@ -5,5 +5,5 @@
  
 Name: RandrProto
 Description: Randr extension headers
-Version: @PACKAGE_VERSION@
+Version: 1.6.0
 Cflags: -I${includedir}
diff -u randrproto-1.5.0/randrproto.txt randrproto-1.6.0/randrproto.txt
--- randrproto-1.5.0/randrproto.txt	2015-05-17 06:24:33.000000000 +0200
+++ randrproto-1.6.0/randrproto.txt	2018-05-22 20:55:09.925702000 +0200
@@ -1,6 +1,6 @@
 	       The X Resize, Rotate and Reflect Extension
-			     Version 1.5.0
-			       2015-03-14
+			     Version 1.6.0
+			       2017-04-01
 
 			      Jim Gettys
 			   Jim.Gettys@hp.com
@@ -9,9 +9,7 @@
 			Hewlett Packard Company
 
 			     Keith Packard
-			keith.packard@intel.com
-		     Open Source Technology Center
-			   Intel Corporation
+			  keithp@keithp.com
 
 1. Introduction
 
@@ -162,7 +160,7 @@
  • A 'Monitor' is a rectangular subset of the screen which represents
    a coherent collection of pixels presented to the user.
 
- • Each Monitor is be associated with a list of outputs (which may be
+ • Each Monitor is associated with a list of outputs (which may be
    empty).
 
  • When clients define monitors, the associated outputs are removed from
@@ -178,7 +176,7 @@
    active outputs associated with them
 
 This new object separates the physical configuration of the hardware
-from the logical subsets  the screen that applications should
+from the logical subsets of the screen that applications should
 consider as single viewable areas.
 
 1.5.1. Relationship between Monitors and Xinerama
@@ -194,6 +192,25 @@
 going forward the X server will not remove outputs dynamically,
 just mark them as disconnected.
 
+1.6. Introduction to version 1.6 of the extension
+
+Version 1.6 adds resource leasing and non desktop output management.
+
+ • A “Lease” is a collection of crtcs and outputs which are made
+   available to a client for direct access via kernel KMS and DRM
+   APIs. This is done by passing a suitable file descriptor back to
+   the client which has access to those resources. While leased, those
+   resources aren't used by the X server.
+
+ • A “non-desktop” output is a device which should not normally be
+   considered as part of the desktop environment. Head-mounted
+   displays and the Apple "Touch Bar" are examples of such
+   devices. A desktop environment should be able to discover which
+   outputs are connected to such devices and, by default, not present
+   normal desktop applications on them. This is done by having
+   RRGetOutputInfo report such devices as Disconnected while reporting
+   all other information about the device correctly.
+
 1.99 Acknowledgments
 
 Our thanks to the contributors to the design found on the xpert mailing
@@ -218,7 +235,7 @@
 Screens may change dynamically, either under control of this extension, or
 due to external events. Examples include: monitors being swapped, pressing a
 button to switch from internal display to an external monitor on a laptop,
-or, eventually, the hotplug of a display card entirely on busses such as
+or, eventually, the hotplug of a display card entirely on buses such as
 Cardbus or Express Card which permit hot-swap (which will require other work
 in addition to this extension).
 
@@ -280,6 +297,8 @@
 	A value for a MODE argument does not name a defined MODE.
 Provider
 	A value for a PROVIDER argument does not name a defined PROVIDER.
+Lease
+	A value for a LEASE argument does not name a defined LEASE
 
 			      ❧❧❧❧❧❧❧❧❧❧❧
 
@@ -427,6 +446,12 @@
 
 			      ❧❧❧❧❧❧❧❧❧❧❧
 
+5.7. Protocol Types added in version 1.6 of the extension
+
+LEASE { XID }
+
+			      ❧❧❧❧❧❧❧❧❧❧❧
+
 6. Extension Initialization
 
 The name of this extension is "RANDR".
@@ -596,7 +621,7 @@
 	rate is unknown or on devices for which refresh is not relevant.
 
 	'sizes' is the list of possible frame buffer sizes (at the normal
-	orientation. Each size indicates both the linear physical size of
+	orientation). Each size indicates both the linear physical size of
 	the screen and the pixel size.
 
 	'refresh' is the list of refresh rates for each size. Each element
@@ -756,6 +781,12 @@
 	monitor in some way; for fixed-pixel devices, this would generally
 	indicate which modes match the resolution of the output device.
 
+	Changes in version 1.6 of the protocol:
+
+	When a “non-desktop” device is connected, the 'connection'
+	field will report Disconnected but the remaining fields will
+	report information about the connected device.
+
 ┌───
     RRListOutputProperties
 	output:OUTPUT
@@ -767,6 +798,12 @@
 	This request returns the atoms of properties currently defined on
 	the output.
 
+	Changes in version 1.6 of the protocol:
+
+	When a “non-desktop” device is connected, the property list
+	will be correct for the device, even though RRGetOutputInfo
+	reports the device as disconnected.
+
 ┌───
     RRQueryOutputProperty
 	output: OUTPUT
@@ -798,6 +835,12 @@
 	changed by clients. Immutable properties are interpreted by the X
 	server.
 
+	Changes in version 1.6 of the protocol:
+
+	When a “non-desktop” device is connected, the property information
+	will be correct for the device, even though RRGetOutputInfo
+	reports the device as disconnected.
+
 ┌───
     RRConfigureOutputProperty
 	output: OUTPUT
@@ -916,6 +959,12 @@
 	is True and the bytes-after is zero, the property is also deleted
 	from the output, and a RROutputPropertyNotify event is generated.
 
+	Changes in version 1.6 of the protocol:
+
+	When a “non-desktop” device is connected, the property value
+	will be correct for the device, even though RRGetOutputInfo
+	reports the device as disconnected.
+
 ┌───
     RRCreateMode
 	window: WINDOW
@@ -991,7 +1040,7 @@
 
 	Errors: Window
 
-	RRGetCrtcModes returns information about the current and available
+	RRGetCrtcInfo returns information about the current and available
 	configurations for the specified crtc connected to the screen
 	associated with 'window'.
 
@@ -1674,6 +1723,57 @@
 	window of the screen.
 
 			      ❧❧❧❧❧❧❧❧❧❧❧
+
+7.6. Extension Requests added in version 1.6 of the extension.
+
+┌───
+    RRCreateLease
+	window : WINDOW
+	lid: LEASE
+	crtcs: LISTofCRTC
+	outputs: LISTofOUTPUT
+     ▶
+	nfd: CARD8
+	lease: FD
+└───
+	Errors: IdChoice, Window, Access, Value, CRTC, Output
+
+	Creates a new Lease called 'lid' for the specified crtcs and
+	outputs from the screen defined by 'window'. Returns a KMS/DRM
+	file descriptor which can control the leased objects directly
+	through the kernel. While leased, all resources will appear to
+	be 'useless' to clients other than the leasing client as
+	follows:
+
+	• Crtcs are reported as having no 'possible-outputs' and all
+	  other values reported as if the crtc were disabled.
+
+	• Outputs are reported as having no crtcs they can be
+	  connected to, no clones they can share a crtc with, will
+	  report a connection status of Disconnected, and will show
+	  the current crtc as if it were disabled.
+
+	The lease remains in effect until the file descriptor is
+	closed, even if the client holding the lease disconnects from
+	the X server.
+
+	Returns an Access error if any of the named resources are
+	already leased to another client.
+
+┌───
+    RRFreeLease
+	lid: LEASE
+	terminate: BOOL
+└───
+	Errors: Lease
+
+	Frees the reference to the lease 'lid'. If 'terminate' is
+	true, then the lease is terminated and all leased resources
+	returned to the X server. If 'terminate' is false, then the
+	lease remains in effect, but the X server no longer has a name
+	for it.
+
+			      ❧❧❧❧❧❧❧❧❧❧❧
 8. Extension Events
 
 Clients MAY select for ConfigureNotify on the root window to be
@@ -1754,6 +1854,12 @@
 	precise change can be detected by examining the new state of the
 	system.
 
+	Changes in version 1.6 of the protocol:
+
+	When a “non-desktop” device is connected, this event will be
+	delivered when the connection status of the output changes,
+	however the 'connection' value will be set to 'Disconnected'.
+
 ┌───
     RROutputPropertyNotify:
 	window: WINDOW			window requesting notification
@@ -1798,7 +1904,7 @@
 	This event is sent whenever the monitor's configuration changes
 	or if a new monitor configuration becomes available that was
 	not available in the past. In this case, the client MUST call
-	RRGetCrtcModes to update its view of possible monitor
+	RRGetCrtcInfo to update its view of possible monitor
 	configurations to have a correct view of possible monitor
 	organizations.
 
@@ -1855,6 +1961,21 @@
 	created or destroyed. Querying the list of available resources
 	with RRGetScreenResources and RRGetProviders will return the new set.
 
+8.3 Events added in version 1.6 of the RandR extension
+
+┌───
+    RRLeaseNotify:
+	timestamp : TIMESTAMP		time screen was reconfigured
+	window : WINDOW			window requesting notification
+	lease : LEASE			lease
+	created : BOOL			created/destroyed indicator
+└───
+
+	This event is generated whenever a lease has been created or
+	destroyed and is sent to requesting clients. 'timestamp'
+	indicates when the change happend.  'window' is the window
+	selecting for this event.
+
 			      ❧❧❧❧❧❧❧❧❧❧❧
 
 9. Properties
@@ -1878,6 +1999,13 @@
 gracefully to lower version functionality, though, if the driver
 doesn't handle a mandatory property correctly.
 
+Changes in version 1.6 of the protocol:
+
+When a “non-desktop” device is connected, the property information
+will be correct for the device, even though RRGetOutputInfo
+reports the device as disconnected. The “non-desktop” property will be
+set to 1 for such devices and not present on other devices.
+
 9.1 Known properties
 
     "Backlight"			aka RR_PROPERTY_BACKLIGHT
@@ -1978,6 +2106,29 @@
 	output. Should include main EDID data and all extension
 	blocks. Previously known as EdidData.
 
+    “non-desktop”	aka RR_PROPERTY_NON_DESKTOP
+	Type:			INTEGER
+	Format:			32
+	Num items:		1
+	Flags			Immutable
+	Range/List:		0-1
+
+	Indicates whether the device attached to this output should not
+	be considered part of the normal desktop. When set to 0 or not
+	present, the output should be presented as part of the
+	desktop.
+
+	When set to 1, the output should not be presented as part of
+	the desktop. To not present an output as part of the desktop,
+	the normal desktop environment should not be shown on this
+	output, nor should desktop applications be positioned on it.
+
+	When set to 1, RRGetOutputInfo will always report connection status
+	Disconnected, but RROutputChangeNotify events will still be
+	delivered when the connection status changes and all other
+	information about the output and connected device will be
+	reported correctly.
+
     "SignalFormat"		aka RR_PROPERTY_SIGNAL_FORMAT
 	Type:			ATOM
 	Format:			32
@@ -2168,6 +2319,13 @@
 Property			Immutable	Mandatory since
 ────────			─────────	───────────────
 TILE				yes		not mandatory
+
+9.8 Properties introduced with version 1.6 of the RandR extension
+
+Property			Immutable	Mandatory since
+────────			─────────	───────────────
+non-desktop			yes		not mandatory
+
 			      ❧❧❧❧❧❧❧❧❧❧❧
 
 10. Extension Versioning
@@ -2206,6 +2364,8 @@
 
 	1.5: Added Monitors
 
+	1.6: Added Leases and non-desktop output information.
+
 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
 changed for GetScreenInfo to ensure this failure in a relatively
@@ -2214,7 +2374,7 @@
 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, CRTC transformations,
-panning, and the primary output concept. Versions 1.2 through 1.4 are
+panning, and the primary output concept. Versions 1.2 through 1.6 are
 backward-compatible with 1.1.
 
 			      ❧❧❧❧❧❧❧❧❧❧❧
@@ -2286,6 +2446,7 @@
 	0x0010	ProviderChangeNotifyMask 	Added in version 1.4
 	0x0020	ProviderPropertyNotifyMask	Added in version 1.4
 	0x0040	ResourceChangeNotifyMask	Added in version 1.4
+	0x0080  LeaseNotifyMask                 Added in version 1.6
 
 └───
       Event select mask for RRSelectInput
@@ -2363,14 +2524,14 @@
 	4	ATOM		name
 	1	BOOL		primary
 	1	BOOL		automatic
-	2	CARD16		ncrtcs
+	2	CARD16		noutputs
 	2	INT16		x
 	2	INT16		y
 	2	CARD16		width in pixels
 	2	CARD16		height in pixels
 	4	CARD32		width in millimeters
 	4	CARD32		height in millimeters
-	4*n	CRTC		crtcs
+	4*n	OUTPUT		outputs
 └───
 
 A.2 Protocol Requests
openSUSE Build Service is sponsored by