xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 22 23:51:13 UTC 2024


 dri3/dri3_request.c              |    1 
 hw/xfree86/modes/xf86RandR12.c   |    2 
 hw/xwayland/xwayland-drm-lease.c |    1 
 hw/xwayland/xwayland-output.c    |    2 
 present/present_request.c        |    2 
 randr/randr.c                    |    2 
 randr/randrstr.h                 |  127 -----------------------------------
 randr/randrstr_priv.h            |  139 +++++++++++++++++++++++++++++++++++++++
 randr/rrcrtc.c                   |    2 
 randr/rrdispatch.c               |    2 
 randr/rrlease.c                  |    2 
 randr/rrmode.c                   |    2 
 randr/rrmonitor.c                |    2 
 randr/rroutput.c                 |    2 
 randr/rrproperty.c               |    2 
 randr/rrprovider.c               |    2 
 randr/rrproviderproperty.c       |    2 
 randr/rrscreen.c                 |    2 
 randr/rrsdispatch.c              |    2 
 randr/rrxinerama.c               |    2 
 20 files changed, 158 insertions(+), 142 deletions(-)

New commits:
commit eda769f34ca5c56ac1ef7e3d74944382cd8cda11
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Fri Feb 9 20:03:12 2024 +0100

    randr: move private definitons from randrstr.h to randrstr_priv.h
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1291>

diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c
index 687168930..99ff73d39 100644
--- a/dri3/dri3_request.c
+++ b/dri3/dri3_request.c
@@ -27,6 +27,7 @@
 #include "../Xext/syncsdk.h"
 #include <protocol-versions.h>
 #include <drm_fourcc.h>
+#include "randrstr_priv.h"
 
 static Bool
 dri3_screen_can_one_point_two(ScreenPtr screen)
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 39a38c741..e17ee5282 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -33,7 +33,7 @@
 #include "mipointer.h"
 #include "windowstr.h"
 #include "inputstr.h"
-#include <randrstr.h>
+#include "randrstr_priv.h"
 #include <X11/extensions/render.h>
 
 #include "xf86cmap.h"
diff --git a/hw/xwayland/xwayland-drm-lease.c b/hw/xwayland/xwayland-drm-lease.c
index 51e9072e4..51c92872e 100644
--- a/hw/xwayland/xwayland-drm-lease.c
+++ b/hw/xwayland/xwayland-drm-lease.c
@@ -31,6 +31,7 @@
 #include <xf86drmMode.h>
 #endif
 
+#include "randrstr_priv.h"
 #include "xwayland-drm-lease.h"
 #include "xwayland-screen.h"
 #include "xwayland-output.h"
diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index 25559d0e1..2788c64d5 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -25,8 +25,8 @@
 
 #include <xwayland-config.h>
 
-#include <randrstr.h>
 #include <X11/Xatom.h>
+#include "randrstr_priv.h"
 
 #include "xwayland-cvt.h"
 #include "xwayland-output.h"
diff --git a/present/present_request.c b/present/present_request.c
index f3e5679b5..f0e8d9909 100644
--- a/present/present_request.c
+++ b/present/present_request.c
@@ -21,7 +21,7 @@
  */
 
 #include "present_priv.h"
-#include "randrstr.h"
+#include "randrstr_priv.h"
 #include <protocol-versions.h>
 
 static int
diff --git a/randr/randr.c b/randr/randr.c
index 6d02c2577..2994bcd6c 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -30,7 +30,7 @@
 #include <dix-config.h>
 #endif
 
-#include "randrstr.h"
+#include "randrstr_priv.h"
 #include "extinit.h"
 
 /* From render.h */
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 545348835..32d1a0ad9 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -65,11 +65,6 @@ typedef XID RRCrtc;
 typedef XID RRProvider;
 typedef XID RRLease;
 
-extern int RREventBase, RRErrorBase;
-
-extern int (*ProcRandrVector[RRNumberRequests]) (ClientPtr);
-extern int (*SProcRandrVector[RRNumberRequests]) (ClientPtr);
-
 /*
  * Modeline for a monitor. Name follows directly after this struct
  */
@@ -467,65 +462,8 @@ typedef struct _RRClient {
 /*  RRTimesRec	times[0]; */
 } RRClientRec, *RRClientPtr;
 
-extern RESTYPE RRClientType, RREventType;     /* resource types for event masks */
-extern DevPrivateKeyRec RRClientPrivateKeyRec;
-
-#define RRClientPrivateKey (&RRClientPrivateKeyRec)
 extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType, RRProviderType, RRLeaseType;
 
-#define VERIFY_RR_OUTPUT(id, ptr, a)\
-    {\
-	int rc = dixLookupResourceByType((void **)&(ptr), id,\
-	                                 RROutputType, client, a);\
-	if (rc != Success) {\
-	    client->errorValue = id;\
-	    return rc;\
-	}\
-    }
-
-#define VERIFY_RR_CRTC(id, ptr, a)\
-    {\
-	int rc = dixLookupResourceByType((void **)&(ptr), id,\
-	                                 RRCrtcType, client, a);\
-	if (rc != Success) {\
-	    client->errorValue = id;\
-	    return rc;\
-	}\
-    }
-
-#define VERIFY_RR_MODE(id, ptr, a)\
-    {\
-	int rc = dixLookupResourceByType((void **)&(ptr), id,\
-	                                 RRModeType, client, a);\
-	if (rc != Success) {\
-	    client->errorValue = id;\
-	    return rc;\
-	}\
-    }
-
-#define VERIFY_RR_PROVIDER(id, ptr, a)\
-    {\
-        int rc = dixLookupResourceByType((void **)&(ptr), id,\
-                                         RRProviderType, client, a);\
-        if (rc != Success) {\
-            client->errorValue = id;\
-            return rc;\
-        }\
-    }
-
-#define VERIFY_RR_LEASE(id, ptr, a)\
-    {\
-        int rc = dixLookupResourceByType((void **)&(ptr), id,\
-                                         RRLeaseType, client, a);\
-        if (rc != Success) {\
-            client->errorValue = id;\
-            return rc;\
-        }\
-    }
-
-#define GetRRClient(pClient)    ((RRClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RRClientPrivateKey))
-#define rrClientPriv(pClient)	RRClientPtr pRRClient = GetRRClient(pClient)
-
 #ifdef RANDR_12_INTERFACE
 /*
  * Set the range of sizes for the screen
@@ -686,7 +624,6 @@ extern _X_EXPORT void
  * the driver calls this whenever it has updated the mode
  */
 extern _X_EXPORT Bool
-
 RRCrtcNotify(RRCrtcPtr crtc,
              RRModePtr mode,
              int x,
@@ -701,7 +638,6 @@ extern _X_EXPORT void
  * Request that the Crtc be reconfigured
  */
 extern _X_EXPORT Bool
-
 RRCrtcSet(RRCrtcPtr crtc,
           RRModePtr mode,
           int x,
@@ -768,7 +704,6 @@ extern _X_EXPORT void
  */
 
 extern _X_EXPORT int
-
 RRCrtcTransformSet(RRCrtcPtr crtc,
                    PictTransformPtr transform,
                    struct pict_f_transform *f_transform,
@@ -827,23 +762,10 @@ extern _X_EXPORT int
 extern _X_EXPORT int
  ProcRRGetCrtcTransform(ClientPtr client);
 
-int
- ProcRRGetPanning(ClientPtr client);
-
-int
- ProcRRSetPanning(ClientPtr client);
-
-void
- RRConstrainCursorHarder(DeviceIntPtr, ScreenPtr, int, int *, int *);
-
 /* rrdispatch.c */
 extern _X_EXPORT Bool
  RRClientKnowsRates(ClientPtr pClient);
 
-/* rrlease.c */
-void
-RRDeliverLeaseEvent(ClientPtr client, WindowPtr window);
-
 extern _X_EXPORT void
 RRLeaseTerminated(RRLeasePtr lease);
 
@@ -856,12 +778,6 @@ RRCrtcIsLeased(RRCrtcPtr crtc);
 extern _X_EXPORT Bool
 RROutputIsLeased(RROutputPtr output);
 
-void
-RRTerminateLease(RRLeasePtr lease);
-
-Bool
-RRLeaseInit(void);
-
 /* rrmode.c */
 /*
  * Find, and if necessary, create a mode
@@ -931,7 +847,6 @@ extern _X_EXPORT Bool
  RROutputSetClones(RROutputPtr output, RROutputPtr * clones, int numClones);
 
 extern _X_EXPORT Bool
-
 RROutputSetModes(RROutputPtr output,
                  RRModePtr * modes, int numModes, int numPreferred);
 
@@ -1005,13 +920,11 @@ extern _X_EXPORT Bool
  RRPostPendingProperties(RROutputPtr output);
 
 extern _X_EXPORT int
-
 RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
                        int format, int mode, unsigned long len,
                        const void *value, Bool sendevent, Bool pending);
 
 extern _X_EXPORT int
-
 RRConfigureOutputProperty(RROutputPtr output, Atom property,
                           Bool pending, Bool range, Bool immutable,
                           int num_values, const INT32 *values);
@@ -1116,51 +1029,13 @@ ProcRRChangeProviderProperty(ClientPtr client);
 
 extern _X_EXPORT int
  ProcRRDeleteProviderProperty(ClientPtr client);
+
 /* rrxinerama.c */
 #ifdef XINERAMA
 extern _X_EXPORT void
  RRXineramaExtensionInit(void);
 #endif
 
-void
-RRMonitorInit(ScreenPtr screen);
-
-Bool
-RRMonitorMakeList(ScreenPtr screen, Bool get_active, RRMonitorPtr *monitors_ret, int *nmon_ret);
-
-int
-RRMonitorCountList(ScreenPtr screen);
-
-void
-RRMonitorFreeList(RRMonitorPtr monitors, int nmon);
-
-void
-RRMonitorClose(ScreenPtr screen);
-
-RRMonitorPtr
-RRMonitorAlloc(int noutput);
-
-int
-RRMonitorAdd(ClientPtr client, ScreenPtr screen, RRMonitorPtr monitor);
-
-void
-RRMonitorFree(RRMonitorPtr monitor);
-
-int
-ProcRRGetMonitors(ClientPtr client);
-
-int
-ProcRRSetMonitor(ClientPtr client);
-
-int
-ProcRRDeleteMonitor(ClientPtr client);
-
-int
-ProcRRCreateLease(ClientPtr client);
-
-int
-ProcRRFreeLease(ClientPtr client);
-
 #endif                          /* _RANDRSTR_H_ */
 
 /*
diff --git a/randr/randrstr_priv.h b/randr/randrstr_priv.h
new file mode 100644
index 000000000..4864f5272
--- /dev/null
+++ b/randr/randrstr_priv.h
@@ -0,0 +1,139 @@
+/*
+ * Copyright © 2000 Compaq Computer Corporation
+ * Copyright © 2002 Hewlett-Packard Company
+ * Copyright © 2006 Intel Corporation
+ * Copyright © 2008 Red Hat, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that copyright
+ * notice and this permission notice appear in supporting documentation, and
+ * that the name of the copyright holders not be used in advertising or
+ * publicity pertaining to distribution of the software without specific,
+ * written prior permission.  The copyright holders make no representations
+ * about the suitability of this software for any purpose.  It is provided "as
+ * is" without express or implied warranty.
+ *
+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ *
+ * Author:  Jim Gettys, Hewlett-Packard Company, Inc.
+ *	    Keith Packard, Intel Corporation
+ */
+
+#ifndef _XSERVER_RANDRSTR_PRIV_H_
+#define _XSERVER_RANDRSTR_PRIV_H_
+
+#include "randrstr.h"
+
+extern int RREventBase, RRErrorBase;
+
+extern int (*ProcRandrVector[RRNumberRequests]) (ClientPtr);
+extern int (*SProcRandrVector[RRNumberRequests]) (ClientPtr);
+
+extern RESTYPE RRClientType, RREventType;     /* resource types for event masks */
+extern DevPrivateKeyRec RRClientPrivateKeyRec;
+
+#define RRClientPrivateKey (&RRClientPrivateKeyRec)
+
+#define VERIFY_RR_OUTPUT(id, ptr, a)\
+    {\
+	int rc = dixLookupResourceByType((void **)&(ptr), id,\
+	                                 RROutputType, client, a);\
+	if (rc != Success) {\
+	    client->errorValue = id;\
+	    return rc;\
+	}\
+    }
+
+#define VERIFY_RR_CRTC(id, ptr, a)\
+    {\
+	int rc = dixLookupResourceByType((void **)&(ptr), id,\
+	                                 RRCrtcType, client, a);\
+	if (rc != Success) {\
+	    client->errorValue = id;\
+	    return rc;\
+	}\
+    }
+
+#define VERIFY_RR_MODE(id, ptr, a)\
+    {\
+	int rc = dixLookupResourceByType((void **)&(ptr), id,\
+	                                 RRModeType, client, a);\
+	if (rc != Success) {\
+	    client->errorValue = id;\
+	    return rc;\
+	}\
+    }
+
+#define VERIFY_RR_PROVIDER(id, ptr, a)\
+    {\
+        int rc = dixLookupResourceByType((void **)&(ptr), id,\
+                                         RRProviderType, client, a);\
+        if (rc != Success) {\
+            client->errorValue = id;\
+            return rc;\
+        }\
+    }
+
+#define VERIFY_RR_LEASE(id, ptr, a)\
+    {\
+        int rc = dixLookupResourceByType((void **)&(ptr), id,\
+                                         RRLeaseType, client, a);\
+        if (rc != Success) {\
+            client->errorValue = id;\
+            return rc;\
+        }\
+    }
+
+#define GetRRClient(pClient)    ((RRClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RRClientPrivateKey))
+#define rrClientPriv(pClient)	RRClientPtr pRRClient = GetRRClient(pClient)
+
+int ProcRRGetPanning(ClientPtr client);
+
+int ProcRRSetPanning(ClientPtr client);
+
+void RRConstrainCursorHarder(DeviceIntPtr, ScreenPtr, int, int *, int *);
+
+/* rrlease.c */
+void RRDeliverLeaseEvent(ClientPtr client, WindowPtr window);
+
+void RRTerminateLease(RRLeasePtr lease);
+
+Bool RRLeaseInit(void);
+
+/* rrprovider.c */
+#define PRIME_SYNC_PROP         "PRIME Synchronization"
+
+void RRMonitorInit(ScreenPtr screen);
+
+Bool RRMonitorMakeList(ScreenPtr screen, Bool get_active, RRMonitorPtr *monitors_ret, int *nmon_ret);
+
+int RRMonitorCountList(ScreenPtr screen);
+
+void RRMonitorFreeList(RRMonitorPtr monitors, int nmon);
+
+void RRMonitorClose(ScreenPtr screen);
+
+RRMonitorPtr RRMonitorAlloc(int noutput);
+
+int RRMonitorAdd(ClientPtr client, ScreenPtr screen, RRMonitorPtr monitor);
+
+void RRMonitorFree(RRMonitorPtr monitor);
+
+int ProcRRGetMonitors(ClientPtr client);
+
+int ProcRRSetMonitor(ClientPtr client);
+
+int ProcRRDeleteMonitor(ClientPtr client);
+
+int ProcRRCreateLease(ClientPtr client);
+
+int ProcRRFreeLease(ClientPtr client);
+
+#endif /* _XSERVER_RANDRSTR_PRIV_H_ */
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 0044fecce..b47f0aeac 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -21,7 +21,7 @@
  * OF THIS SOFTWARE.
  */
 
-#include "randrstr.h"
+#include "randrstr_priv.h"
 #include "swaprep.h"
 #include "mipointer.h"
 
diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c
index a5b390914..98b8f1807 100644
--- a/randr/rrdispatch.c
+++ b/randr/rrdispatch.c
@@ -20,7 +20,7 @@
  * OF THIS SOFTWARE.
  */
 
-#include "randrstr.h"
+#include "randrstr_priv.h"
 #include "protocol-versions.h"
 
 Bool
diff --git a/randr/rrlease.c b/randr/rrlease.c
index cb366e767..51709c8c2 100644
--- a/randr/rrlease.c
+++ b/randr/rrlease.c
@@ -20,7 +20,7 @@
  * OF THIS SOFTWARE.
  */
 
-#include "randrstr.h"
+#include "randrstr_priv.h"
 #include "swaprep.h"
 #include <unistd.h>
 
diff --git a/randr/rrmode.c b/randr/rrmode.c
index d34025bd0..51163616c 100644
--- a/randr/rrmode.c
+++ b/randr/rrmode.c
@@ -20,7 +20,7 @@
  * OF THIS SOFTWARE.
  */
 
-#include "randrstr.h"
+#include "randrstr_priv.h"
 
 RESTYPE RRModeType;
 
diff --git a/randr/rrmonitor.c b/randr/rrmonitor.c
index 0ec36f677..bc7e6c87c 100644
--- a/randr/rrmonitor.c
+++ b/randr/rrmonitor.c
@@ -20,7 +20,7 @@
  * OF THIS SOFTWARE.
  */
 
-#include "randrstr.h"
+#include "randrstr_priv.h"
 #include "swaprep.h"
 
 static Atom
diff --git a/randr/rroutput.c b/randr/rroutput.c
index db0bb0f29..18003c92e 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -21,7 +21,7 @@
  * OF THIS SOFTWARE.
  */
 
-#include "randrstr.h"
+#include "randrstr_priv.h"
 #include <X11/Xatom.h>
 
 RESTYPE RROutputType;
diff --git a/randr/rrproperty.c b/randr/rrproperty.c
index c4fef8a1f..327a0656c 100644
--- a/randr/rrproperty.c
+++ b/randr/rrproperty.c
@@ -20,7 +20,7 @@
  * OF THIS SOFTWARE.
  */
 
-#include "randrstr.h"
+#include "randrstr_priv.h"
 #include "propertyst.h"
 #include "swaprep.h"
 #include <X11/Xatom.h>
diff --git a/randr/rrprovider.c b/randr/rrprovider.c
index d628a20d4..ab4d76be9 100644
--- a/randr/rrprovider.c
+++ b/randr/rrprovider.c
@@ -23,7 +23,7 @@
  * Authors: Dave Airlie
  */
 
-#include "randrstr.h"
+#include "randrstr_priv.h"
 #include "swaprep.h"
 
 #include <X11/Xatom.h>
diff --git a/randr/rrproviderproperty.c b/randr/rrproviderproperty.c
index 90c5a9a93..7f22c7e34 100644
--- a/randr/rrproviderproperty.c
+++ b/randr/rrproviderproperty.c
@@ -20,7 +20,7 @@
  * OF THIS SOFTWARE.
  */
 
-#include "randrstr.h"
+#include "randrstr_priv.h"
 #include "propertyst.h"
 #include "swaprep.h"
 
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 58b5299b4..ef6fb12a6 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -20,7 +20,7 @@
  * OF THIS SOFTWARE.
  */
 
-#include "randrstr.h"
+#include "randrstr_priv.h"
 
 static CARD16
  RR10CurrentSizeID(ScreenPtr pScreen);
diff --git a/randr/rrsdispatch.c b/randr/rrsdispatch.c
index 7d7b5a884..1f29d9d39 100644
--- a/randr/rrsdispatch.c
+++ b/randr/rrsdispatch.c
@@ -20,7 +20,7 @@
  * OF THIS SOFTWARE.
  */
 
-#include "randrstr.h"
+#include "randrstr_priv.h"
 
 static int _X_COLD
 SProcRRQueryVersion(ClientPtr client)
diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c
index 5f01e953c..1f5c74fc0 100644
--- a/randr/rrxinerama.c
+++ b/randr/rrxinerama.c
@@ -68,7 +68,7 @@
  *           David Thomas <davtom at dream.org.uk>.
  */
 
-#include "randrstr.h"
+#include "randrstr_priv.h"
 #include "swaprep.h"
 #include <X11/extensions/panoramiXproto.h>
 #include "protocol-versions.h"


More information about the xorg-commit mailing list