xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 23 23:23:00 UTC 2024


 Xext/bigreq.c    |    1 +
 dix/dispatch.c   |    2 +-
 dix/dix_priv.h   |   18 ++++++++++++++++++
 dix/globals.c    |    1 +
 include/opaque.h |    1 -
 include/os.h     |    3 ---
 meson.build      |    1 +
 os/io.c          |    1 +
 os/utils.c       |    4 +---
 9 files changed, 24 insertions(+), 8 deletions(-)

New commits:
commit fe1e2b7b3d9f2ed6c16cbdb9a50102b3f520d056
Author: Enrico Weigelt, metux IT consult <info at metux.net>
Date:   Tue Feb 6 16:22:04 2024 +0100

    dix: unexport and move maxBigRequestSize
    
    * this symbol is a server configuration flag (can be passed via cmdline)
      for limiting the max size of big-requests. there shouldn't be any need
      to use it outside the core X server (in server modules like drivers
      or external extension) - therefore unexport it
    * in order to reduce namespace pollution of public (server module API)
      headers, create a new internal header for those tings (more to come)
    
    Signed-off-by: Enrico Weigelt, metux IT consult <info at metux.net>
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1275>

diff --git a/Xext/bigreq.c b/Xext/bigreq.c
index c78a1e4b4..b2b9dce67 100644
--- a/Xext/bigreq.c
+++ b/Xext/bigreq.c
@@ -35,6 +35,7 @@ from The Open Group.
 #include "misc.h"
 #include "os.h"
 #include "dixstruct.h"
+#include "dix_priv.h"
 #include "extnsionst.h"
 #include <X11/extensions/bigreqsproto.h>
 #include "opaque.h"
diff --git a/dix/dispatch.c b/dix/dispatch.c
index eaac39b7c..88502709d 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -105,12 +105,12 @@ Equipment Corporation.
 #include <X11/fonts/fontstruct.h>
 #include <X11/fonts/libxfont2.h>
 #include "dixfontstr.h"
+#include "dix_priv.h"
 #include "gcstruct.h"
 #include "selection.h"
 #include "colormapst.h"
 #include "cursorstr.h"
 #include "scrnintstr.h"
-#include "opaque.h"
 #include "input.h"
 #include "servermd.h"
 #include "extnsionst.h"
diff --git a/dix/dix_priv.h b/dix/dix_priv.h
new file mode 100644
index 000000000..c21043594
--- /dev/null
+++ b/dix/dix_priv.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: MIT OR X11
+ *
+ * Copyright © 2024 Enrico Weigelt, metux IT consult <info at metux.net>
+ */
+#ifndef _XSERVER_DIX_PRIV_H
+#define _XSERVER_DIX_PRIV_H
+
+/* This file holds global DIX settings to be used inside the Xserver,
+ *  but NOT supposed to be accessed directly by external server modules like
+ *  drivers or extension modules. Thus the definitions here are not part of the
+ *  Xserver's module API/ABI.
+ */
+
+/* server setting: maximum size for big requests */
+#define MAX_BIG_REQUEST_SIZE 4194303
+extern long maxBigRequestSize;
+
+#endif /* _XSERVER_DIX_PRIV_H */
diff --git a/dix/globals.c b/dix/globals.c
index 4b8b52e29..cce23ad1f 100644
--- a/dix/globals.c
+++ b/dix/globals.c
@@ -56,6 +56,7 @@ SOFTWARE.
 #include "input.h"
 #include "dixfont.h"
 #include "dixstruct.h"
+#include "dix_priv.h"
 #include "os.h"
 
 ScreenInfo screenInfo;
diff --git a/include/opaque.h b/include/opaque.h
index 893db7807..b17380915 100644
--- a/include/opaque.h
+++ b/include/opaque.h
@@ -66,7 +66,6 @@ extern _X_EXPORT int limitStackSpace;
 extern _X_EXPORT int limitNoFile;
 #endif
 extern _X_EXPORT Bool defeatAccessControl;
-extern _X_EXPORT long maxBigRequestSize;
 extern _X_EXPORT Bool whiteRoot;
 extern _X_EXPORT Bool bgNoneRoot;
 
diff --git a/include/os.h b/include/os.h
index b02107ae1..5c43fdde0 100644
--- a/include/os.h
+++ b/include/os.h
@@ -66,9 +66,6 @@ SOFTWARE.
 #ifndef MAX_REQUEST_SIZE
 #define MAX_REQUEST_SIZE 65535
 #endif
-#ifndef MAX_BIG_REQUEST_SIZE
-#define MAX_BIG_REQUEST_SIZE 4194303
-#endif
 
 typedef struct _FontPathRec *FontPathPtr;
 typedef struct _NewClientRec *NewClientPtr;
diff --git a/meson.build b/meson.build
index 1de3e2a4f..09f2d7a57 100644
--- a/meson.build
+++ b/meson.build
@@ -655,6 +655,7 @@ inc = include_directories(
     'miext/shadow',
     'miext/sync',
     'dbe',
+    'dix',
     'dri3',
     'include',
     'present',
diff --git a/os/io.c b/os/io.c
index 83b01111f..c727f4bff 100644
--- a/os/io.c
+++ b/os/io.c
@@ -76,6 +76,7 @@ SOFTWARE.
 #include "osdep.h"
 #include "opaque.h"
 #include "dixstruct.h"
+#include "dix_priv.h"
 #include "misc.h"
 
 CallbackListPtr ReplyCallback;
diff --git a/os/utils.c b/os/utils.c
index 184b045f0..8287a66f5 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -103,10 +103,8 @@ __stdcall unsigned long GetTickCount(void);
 #endif
 #endif
 
-#include "opaque.h"
-
 #include "dixstruct.h"
-
+#include "dix_priv.h"
 #include "xkbsrv.h"
 
 #include "picture.h"


More information about the xorg-commit mailing list