Commit Graph

2922 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult
9dc8868029 WIP mark xinerama functions 2026-02-11 16:31:28 +01:00
Enrico Weigelt, metux IT consult
78b44589a1 include: misc.h: unexport various bit/byte counting inline functions
Those aren't used by any external drivers, so no need to keep
them in public header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-11 16:31:28 +01:00
Enrico Weigelt, metux IT consult
36632bb02e dix: dixfonts: unexport functions not used by drivers
No need to keep functions exported that aren't needed by external drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-11 16:31:28 +01:00
Enrico Weigelt, metux IT consult
7f3df5fa94 [PR #1063] dix: use xorg_list saveSet list
PR: https://github.com/X11Libre/xserver/pull/1063
2026-02-11 16:31:28 +01:00
Enrico Weigelt, metux IT consult
3f7bfbafcd [PR #1358] dix: unexport defaultFontPath
PR: https://github.com/X11Libre/xserver/pull/1358
2026-02-11 16:31:28 +01:00
Enrico Weigelt, metux IT consult
77effa6950 [PR #1383] dix: unexport several extension related functions
PR: https://github.com/X11Libre/xserver/pull/1383
2026-02-11 16:31:28 +01:00
Enrico Weigelt, metux IT consult
6951394d43 [PR #1387] dix: unexport DontPropagateMask and wDontPropagateMask() macro
PR: https://github.com/X11Libre/xserver/pull/1387
2026-02-11 16:31:28 +01:00
Enrico Weigelt, metux IT consult
62f121aedf [PR #1388] dix: unexport lastResourceType and TypeMask
PR: https://github.com/X11Libre/xserver/pull/1388
2026-02-11 16:31:28 +01:00
Enrico Weigelt, metux IT consult
2a9da57648 [PR #1389] dix: unexport internal region helper functions
PR: https://github.com/X11Libre/xserver/pull/1389
2026-02-11 16:31:28 +01:00
Enrico Weigelt, metux IT consult
e73a4b492e [PR #1467] dix: unexport defaultColorVisualClass
PR: https://github.com/X11Libre/xserver/pull/1467
2026-02-11 16:31:28 +01:00
Enrico Weigelt, metux IT consult
63fd3d585f [PR #1487] dix: unexport functions from pixmap.h
PR: https://github.com/X11Libre/xserver/pull/1487
2026-02-11 16:31:28 +01:00
Enrico Weigelt, metux IT consult
86e0d95d9f [PR #1490] treewide: replace min/max macros by non-exported MIN/MAX and deprecate them
PR: https://github.com/X11Libre/xserver/pull/1490
2026-02-11 16:31:28 +01:00
Enrico Weigelt, metux IT consult
62b0add858 mi: move ValidateRec to mi_priv.h and rename to MiValidateRec
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-10 18:27:41 +01:00
Enrico Weigelt, metux IT consult
d28d18ff00 dix: replace "screen" by "pScreen" in AttachDevice()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-09 19:28:45 +01:00
Enrico Weigelt, metux IT consult
4642d6207f os: unexport SeatId and move it to dix settings
Not used by any external module/driver, so no need to keep it
public. Also move it to the new dix settings code and rename it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-03 11:34:14 +01:00
Enrico Weigelt, metux IT consult
4ee2a5e16a dix: inline SProcGrabButton()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-31 16:20:28 +01:00
Enrico Weigelt, metux IT consult
28d930b16c dix: inline SProcQueryColor()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-31 16:16:19 +01:00
Enrico Weigelt, metux IT consult
a9c2edfffd dix: encapsulate ScreenRec::UnrealizeWindow() call in helper function
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-08 17:44:11 +01:00
Enrico Weigelt, metux IT consult
3adf207be1 dix: tiny cleanup in CrushTree()
Make it a little bit easier to understand.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-01-07 19:18:54 +01:00
Enrico Weigelt, metux IT consult
d45aeab1b6 dix: inline ProcQueryExtension()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 12:01:03 +01:00
Enrico Weigelt, metux IT consult
b19f3babe7 dix: inline SProcCreateGlyphCursor()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 12:00:50 +01:00
Enrico Weigelt, metux IT consult
5c3980b407 dix: inline ProcSetScreenSaver()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 11:59:08 +01:00
Enrico Weigelt, metux IT consult
07b0c67c28 dix: inline SProcRotateProperties()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 11:58:53 +01:00
Enrico Weigelt, metux IT consult
7a2a3c9016 dix: inline SProcGrabPointer()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 11:58:41 +01:00
Enrico Weigelt, metux IT consult
a47b2ce91c dix: inline SProcGetProperty()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 11:58:24 +01:00
Enrico Weigelt, metux IT consult
ca35b825a3 dix: inline SProcLookupColor()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-19 11:58:11 +01:00
Enrico Weigelt, metux IT consult
2285961661 dix: fix inttype mismatches in AllocARGBCursor & AllocGlyphCursor
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 16:28:25 +01:00
Enrico Weigelt, metux IT consult
aefde94a2d meson: drop obsolete vendor information options
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-17 13:52:37 +01:00
Aggelos Tselios
729f471b9e dix: move alwaysCheckForInput declaration to first use
Move the declaration of alwaysCheckForInput closer to where it is first
used and initialize it at declaration rather than assigning it later.

Signed-off-by: Aggelos Tselios <aggelostselios777@gmail.com>
2025-12-15 14:10:59 +01:00
Enrico Weigelt, metux IT consult
4609d2e5e8 dix: Dispatch() separate variable for read result
Mixing result variables for separate things is making the code hard
to understand, so add a new local variable for temporarily storing
the result of ReadRequestFromClient().

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-12 13:49:15 +01:00
Alan Coopersmith
2be080c4e3 dix: set errorValue correctly when XID lookup fails in ChangeGCXIDs()
dixLookupResourceByType always overwrites the pointer passed in as the
first arg, so we shouldn't use the union it's in after that to get the
requested XID value to put in the errorValue.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1857
Fixes: 2d7eb4a19b ("Pre-validate ChangeGC XIDs.")
Reported-by: Mouse <mouse@Rodents-Montreal.ORG>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2111>
2025-12-09 17:41:25 +01:00
Enrico Weigelt, metux IT consult
609ea42a62 include: don't install client.h anymore
not included by any drivers, so doesn't need to be in SDK anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-05 19:44:59 +01:00
Enrico Weigelt, metux IT consult
19ee44b607 treewide: drop including <dix-config.h> from private includes
All .c sources must include <dix-config.h> at the very first.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 19:50:44 +01:00
Enrico Weigelt, metux IT consult
36503b11b7 dix: consistenly name reply structs "reply" instead of "rep"
Preparation for future use of generic reply assembly macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 16:28:06 +01:00
Enrico Weigelt, metux IT consult
01502a4ddd dix: request_priv.h: fix X_REQUEST_REST_COUNT_CARD16()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-04 14:26:41 +01:00
Enrico Weigelt, metux IT consult
a173278c4f dix: make SwapLongs() inline
a) trade a little bit of code size for speed
   (depending on exact caller, compiler might also optimize a lot)
b) reduce the need for exported, but non-public symbol

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 14:30:02 +01:00
Enrico Weigelt, metux IT consult
6a320e76cb dix: add macros for request handlers and swapping
add some macros for making request handlers and byte swapping easier:

    * X_REQUEST_HEAD_STRUCT(type) and X_REQUEST_HEAD_AT_LEAST(type)
      declare header struct pointers and check size
    * X_REQUEST_FIELD_CARD16(field)
      swaps a CARD16 (word) header field (if neccessary)
    * X_REQUEST_FIELD_CARD32(field)
      swaps a CARD32 (dword) header field (if neccessary)
    * X_REQUEST_REST_CARD16()
      swaps remaining CARD16 array payload (if necessary)
    * X_REQUEST_REST_CARD32()
      swaps remaining CARD32 array payload (if necessary)
    * X_REQUEST_REST_COUNT_CARD16(count)
      check swaps `count` CARD16 payload fields and checks size
    * X_REQUEST_REST_COUNT_CARD32(count)
      check swaps `count` CARD32 payload fields and checks size

How to use them:

    1. put X_REQUEST_HEAD_STRUCT() or X_REQUEST_HEAD_AT_LEAST() ontop of each Proc*()
    2. add X_REQUEST_FIELD_*() et al below, for all fields to be swapped and
       drop the corresponding SProc*()'s
    3. let the dispatchers call Proc*() instead of SProc*()

Notes:

    * the length field is already swapped before request handlers called

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-12-03 10:58:14 +01:00
Oleh Nykyforchyn
f4115e69eb dix: initialize all screens before proceeding to gc's, root windows etc
Current code walks along all screens and initializes screen resources,
then gc's, stipples, root windows for each of them, hence after
the first screen registering new private keys is no more possible.
This crashes modesetting driver if it is not initialized before others.

This patch makes screen resources for all screen initialize first, hence
all necessary private keys (including of the type PRIVATE_WINDOW) are
initialized before root windows are created.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-12-03 09:24:33 +01:00
Marc-Alexandre Espiaut
e1b3bbafa8 dix: remove dixLookupBuiltinColor() unused screen argument
Signed-off-by: Marc-Alexandre Espiaut <76531574+malespiaut@users.noreply.github.com>
2025-11-28 18:43:40 +01:00
Enrico Weigelt, metux IT consult
e14d352661 dix: move GCAllBits define into private header
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 20:05:59 +01:00
Enrico Weigelt, metux IT consult
33729b1361 include: windowstr.h: unexport w*() macros
These aren't used by any drivers, so no need to keep them public.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 19:54:42 +01:00
Enrico Weigelt, metux IT consult
ff8d26df21 include: windowstr.h: unexport SameBackground() and SamBorder() macros
Not used by any drivers, so no need to keep them public.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 19:49:14 +01:00
Enrico Weigelt, metux IT consult
9b8d7d1eb9 treewide: don't include <region.h> anymore
Nothing in there that we need, include <regionstr.h> instead.
But keeping the file in place, until all external consumer have
been migrated.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 19:27:27 +01:00
Oleh Nykyforchyn
0230c6e074 dix: reexport ConnectionInfo for NVidia 390
This patch exports ConnectionInfo in server_priv.h and references
it in globals.c to force exporting.

Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
2025-11-27 17:06:36 +01:00
Enrico Weigelt, metux IT consult
85fae9bffb dix: inline SProcAllocColor()
Now that we have untwisted Xinerama side, it's trivial to inline
the few lines for byte-swapping into the actual handlers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 13:46:37 +01:00
Alan Coopersmith
e352fdecfe dix: handle allocation failure in DeviceFocusEvent()
Reported in https://gitlab.freedesktop.org/xorg/xserver/-/issues/1817:

xwayland-24.1.6/redhat-linux-build/../dix/enterleave.c:786:5:
 warning[-Wanalyzer-possible-null-dereference]:
 dereference of possibly-NULL ‘xi2event’

Fixes: 3f37923a72 ("Xi: send XI2 focus events." in Xorg 1.10.0)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2078>
2025-11-27 13:36:49 +01:00
Enrico Weigelt, metux IT consult
92a015504e dix: make BITMAP_SCANLINE_UNIT private
Not used by any external drivers, so no need to keep it public.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 12:05:55 +01:00
Enrico Weigelt, metux IT consult
5532917d76 os: move AllowByteSwappedClients setting into DIX
Adding new source and header that's going to host all DIX
settings (set via cmdline or xf86 config file) in the future.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-27 10:44:23 +01:00
Enrico Weigelt, metux IT consult
8039c2cbf1 dix: unexport SwapLongs()
Not used by any external drivers, so no need to keep it in public SDK.
Since it's used by internal modules, still needs to be _X_EXPORT'ed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-25 18:26:02 +01:00
Mike Gelfand
f40bfb5ca9 dix: move include guards up to wrap the whole file
See: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-11-21 15:20:11 +01:00