Commit Graph

19467 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult 4b45c749e4 dix: drop unused parameter from ConfineToShape()
The device parameter is never used, so no point in passing it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:15 +02:00
Enrico Weigelt, metux IT consult 2da45bd9ca dix: unexport and document ConfineToShape()
Not used by any drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:09 +02:00
Enrico Weigelt, metux IT consult a58fd6f511 (!2007) dix: unexport SendGraphicsExpose() and fix parameter types
* not used by any drivers, so no need to keep it exported
* fix parameter types to matching the protocol types

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:08 +02:00
Enrico Weigelt, metux IT consult a94e906084 dix: unexport SendErrorToClient() and fix parameter types
* not used by any drivers, so no need to keep it exported
* fix parameter types to matching the protocol types

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:05 +02:00
Enrico Weigelt, metux IT consult 689de526a4 dix: unexport and document ClientIsAsleep()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:01 +02:00
Enrico Weigelt, metux IT consult 2e0cde7b56 dix: unexport and document ClientWakeup()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:58 +02:00
Enrico Weigelt, metux IT consult 646c76adea dix: unexport and document ClientSignalAll()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:52 +02:00
Enrico Weigelt, metux IT consult b528301f97 dix: unexport and document ClientSignal()
Not used by any external drivers, so no need to keep it exported.

Also renamed to dixClientSignal(), since there's a conflicting prototype
in fontsproto.h.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:49 +02:00
Enrico Weigelt, metux IT consult 8104fc115d dix: unexport and document ClientSleep()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:45 +02:00
Enrico Weigelt, metux IT consult 49107319f7 dix: unexport and document MarkClientException()
Not supposed to be used by external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:42 +02:00
Enrico Weigelt, metux IT consult 5ae5fa9671 dix: unexport and document NextAvailableClient()
Only called from OS layer, thus should not be exported at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:39 +02:00
Enrico Weigelt, metux IT consult e9351ba7e0 include: drop obsolete dixevents.h
The include has become empty now. Not used by any external drivers,
so it can be dropped now.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:35 +02:00
Enrico Weigelt, metux IT consult fe951f7dd4 dix: unexport and document EventSuppressForWindow()
Not used by any external drivers, and not supposed to be used by them,
so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:32 +02:00
Enrico Weigelt, metux IT consult b15cde3a1c dix: unexport and document EventSelectForWindow()
Not used by any external drivers, and not supposed to be used by them,
so no need to keep it in public API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:29 +02:00
Enrico Weigelt, metux IT consult 8a49bfaa5b dix: XineramaTryClientEventsResult() change return type to Bool
Callers are only interested in whether event was actually sent
(retval==1) or not, so Bool is sufficient and easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:26 +02:00
Enrico Weigelt, metux IT consult 09f46c97b6 dix: MaybeDeliverEventToClient(): change return type to Bool
Callers are only interesed in whether event was actually sent
(retval==1) or not, so Bool is suffient and easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:22 +02:00
Enrico Weigelt, metux IT consult d74f591ce4 dix: MaybeDeliverEventToClient() drop count parameter
It's always called with just a single event, so no need for the count
parameter. Also renaming it in order to better fit it's new semantics.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:18 +02:00
Enrico Weigelt, metux IT consult 0b6715c6dc dix: unexport and document MaybeDeliverEventsToClient()
Not used by any external drivers, and only supposed to be DIX internal,
so shouldn't be exported at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:14 +02:00
Enrico Weigelt, metux IT consult 3fd183f637 dix: unexport, rename and document GetSpriteCursor()
* not used by any external drivers, so no need to keep it exported
* choose better fitting name: InputDevGetSpriteCursor()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:16:59 +02:00
Enrico Weigelt, metux IT consult 0f522fa893 dix: unexport and document SetCriticalEvent()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:16:50 +02:00
Enrico Weigelt, metux IT consult 9f0fa773b9 dix: unexport events related request handlers
Request handlers aren't supposed to be called by external drivers directly,
so no need to keep them in the public SDK API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:16:45 +02:00
Enrico Weigelt, metux IT consult 4cbe7e550c sdk: add generic X return code
This type is should be used instead of plain int for all functions
returning and X error code (that's possibly sent to the client),
in order to make return value semantics clear to the humen reader.
(for the compiler, it still will be just an int)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:16:42 +02:00
Enrico Weigelt, metux IT consult 802a581f51 sdk: add _X_ATTRIBUTE_NONNULL_ARGS() macro
Adding a macro for specifying nonnull attributes, for easier future
transition to new C23 attributes or supporting strange compilers that
don't understand this attribute.

The purpose of using those attributes is aiding compiler warnings and
potential optimizations.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:16:37 +02:00
Alan Coopersmith 0d2213ec44 Xephyr.man: Use \- to get ASCII hyphens instead of Unicode dashes
Used in command-line arguments and email addresses

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2009>
2025-05-31 15:15:13 -07:00
Alan Coopersmith ff4f2f718b man pages: don't use .BI macro with a single argument
Clears warnings from groff -rCHECKSTYLE=10:

an.tmac: Xephyr.man:53: style: .BI expects at least 2 arguments, got 1
an.tmac: Xephyr.man:55: style: .BI expects at least 2 arguments, got 1
an.tmac: Xwayland.man:151: style: .BI expects at least 2 arguments, got 1
an.tmac: Xwayland.man:166: style: .BI expects at least 2 arguments, got 1

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2009>
2025-05-31 15:10:35 -07:00
Alan Coopersmith 286578e83e XWin.man: fix typos in font change escapes
Fixes warnings from `mandoc -T lint`:

mandoc: XWin.man:332:28: WARNING: invalid escape sequence: \fp
mandoc: XWin.man:397:1: WARNING: invalid escape sequence: \fX

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2009>
2025-05-31 15:06:23 -07:00
Alan Coopersmith bd08e04fcb man pages: remove extraneous PP macros
Clears warnings from `mandoc -T lint` of the forms:
mandoc: Xorg.man:26:2: WARNING: skipping paragraph macro: PP after SH
mandoc: Xorg.man:40:2: WARNING: skipping paragraph macro: PP empty

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2009>
2025-05-31 15:01:49 -07:00
Alan Coopersmith 6dfe3e7db6 man pages: strip trailing whitespace
Gets rid of many warnings from `mandoc -T lint` of the form:
mandoc: ./man/Xserver.man:621:7: STYLE: whitespace at end of input line

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2009>
2025-05-31 14:51:24 -07:00
Alan Coopersmith 7aa1f121e4 mi: use common implementation of bit counting function
Reduce a bit of unexplained magic, and use ISA extensions where available

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1984>
2025-05-20 00:34:23 +00:00
Enrico Weigelt, metux IT consult 73f3c47608 randr: fix unconditional byte-swap in ProcRRGetProviderInfo()
The list of the associated provider's capabilities was always swapped
unconditionally, while it should only be in case of client having
opposite endianess.

Fixes: 426bc0a28e
Reported-By: dasha_uwu
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1977>
2025-05-18 23:42:19 +00:00
Enrico Weigelt, metux IT consult f0fd9f8bf4 dix: fix warning on redefinition of typedefs
| ../dix/input_priv.h:56:29: warning: redefinition of typedef 'InputOption' is a C11 feature [-Wtypedef-redefinition]
|    56 | typedef struct _InputOption InputOption;
|       |                             ^
| ../include/input.h:255:29: note: previous definition is here
|   255 | typedef struct _InputOption InputOption;
|       |                             ^
| In file included from ../hw/xfree86/common/xf86Cursor.c:36:
| ../dix/input_priv.h:57:25: warning: redefinition of typedef 'XI2Mask' is a C11 feature [-Wtypedef-redefinition]
|    57 | typedef struct _XI2Mask XI2Mask;
|       |                         ^
| ../include/input.h:256:25: note: previous definition is here
|   256 | typedef struct _XI2Mask XI2Mask;
|       |                         ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1978>
2025-05-18 17:35:31 +00:00
Olivier Fourdan b97b459c06 xwayland: Update sprite prior to clearing the focus window
Xwayland has its own XYToWindow() handler to account for the case when
the pointer leaves an X11 surface to enter another Wayland native window
(which of course are unknown to Xwayland).

When that occurs, Xwayland will treat it as if the pointer had entered
the root window so that the X11 clients receive an appropriate leave
event.

When the pointer leaves the X11 surface, Xwayland will call
CheckMotion() to update the sprite coordinates and possibly the cursor.

However, CheckMotion() will call back into the XYToWindow() handler,
which will then pretend the window has entered the root window, and that
may cause the wrong cursor to be applied.

To avoid the issue, change the order we do things, by calling
CheckMotion() first prior to clear up the internal focus window so that
the first call to XYToWindow() will return the correct X11 window so we
get to update the cursor correctly.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1811
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1915>
2025-05-16 10:02:53 +00:00
Alan Coopersmith 37b7ea8f8a render: miindex.c does not need header guard macros
Clears warning from clang 19.1.7:

render/miindex.c:27:9: warning: macro is not used [-Wunused-macros]
   27 | #define _MIINDEX_H_
      |         ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1910>
2025-04-19 17:02:16 +00:00
Alan Coopersmith f988558348 os: remove unused definition of BUGADDRESS
We stopped including this in error messages back in 2008

Clears warning from clang 19.1.7:

os/utils.c:1338:9: warning: macro is not used [-Wunused-macros]
 1338 | #define BUGADDRESS BUILDERADDR
      |         ^

Fixes: ef77e4c44 ("Remove useless commentary from environment and argument processing.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1910>
2025-04-19 17:02:16 +00:00
Alan Coopersmith d1cc5a599f test: remove extra return
Clears warning from clang 19.1.7:

test/misc.c:239:12: warning: 'return' will never be executed
 [-Wunreachable-code-return]
  239 |     return 0;

Fixes: 46b579e8d ("test: switch the unit tests to something resembling a test suite")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1910>
2025-04-19 17:02:15 +00:00
Alan Coopersmith 14e202d6a0 xfixes: cursor.c should include header for CursorVisible & EnableCursor
Clears warnings from clang 19.1.7:

xfixes/cursor.c:132:6: warning: no previous extern declaration for
 non-static variable 'CursorVisible' [-Wmissing-variable-declarations]
  132 | Bool CursorVisible = FALSE;
      |      ^
xfixes/cursor.c:133:6: warning: no previous extern declaration for
 non-static variable 'EnableCursor' [-Wmissing-variable-declarations]
  133 | Bool EnableCursor = TRUE;
      |      ^

Fixes: 2cec3cfbf ("include: move private definitions out of input.h")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1910>
2025-04-19 17:02:15 +00:00
Alan Coopersmith b490578242 os: connection.c should include header that defines GrabInProgress
Clears warning from clang 19.1.7:

os/connection.c:133:5: warning: no previous extern declaration for
 non-static variable 'GrabInProgress' [-Wmissing-variable-declarations]
  133 | int GrabInProgress = 0;
      |     ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1910>
2025-04-19 17:02:15 +00:00
Alan Coopersmith 0fefdc6e29 dix: tables.c should include header that defines InitialVector
Clears warning from clang 19.1.7:

dix/tables.c:59:7: warning: no previous extern declaration for non-static
 variable 'InitialVector' [-Wmissing-variable-declarations]
   59 | int (*InitialVector[3]) (ClientPtr /* client */) = {
      |       ^

Fixes: bae6cbc8c ("include: move private defs to dixstruct_priv.h")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1910>
2025-04-19 17:02:15 +00:00
Alan Coopersmith 062c339519 modesetting: fix typo in XF86ModuleVersionInfo initialization
Found by clang 19.1.7:

hw/xfree86/drivers/modesetting/driver.c:163:21:
 warning: initializer overrides prior initialization of this subobject
 [-Winitializer-overrides]
  163 |     ._modinfo1_   = MODINFOSTRING2,
      |                     ^~~~~~~~~~~~~~
hw/xfree86/drivers/modesetting/driver.c:162:21:
 note: previous initialization is here
  162 |     ._modinfo1_   = MODINFOSTRING1,
      |                     ^~~~~~~~~~~~~~

Fixes: 2a10eff6c ("xfree86: modsetting: use explicit field initializers for XF86ModuleData")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1910>
2025-04-19 17:02:15 +00:00
Alan Coopersmith 3eaa19d74b test: remove stray semi-colons after functions
Clears warnings from clang 19.1.7:

test/list.c:95:2: warning: extra ';' outside of a function [-Wextra-semi]
   95 | };
      |  ^

test/list.c:137:2: warning: extra ';' outside of a function [-Wextra-semi]
  137 | };
      |  ^

Fixes: 92788e677 ("test: add some tests for basic list manipulation.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1910>
2025-04-19 17:02:15 +00:00
Alan Coopersmith f9d25189fa xfree86: make modeline2c.awk put a newline at the end of xf86DefModeSet.c
Clears warning from clang 19.1.7:
hw/xfree86/common/xf86DefModeSet.c:288:62:
 warning: no newline at end of file [-Wnewline-eof]
  288 | const int xf86NumDefaultModes = ARRAY_SIZE(xf86DefaultModes);
      |                                                              ^

Fixes: 3bf7ff703 ("Size xf86DefaultModes explicitly.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1910>
2025-04-19 17:02:15 +00:00
Peter Harris dfbc672e85 Update mailmap for Peter Harris
My division was acquired by Rocket Software. The opentext.com email
address is no longer active.

Ref: https://investors.opentext.com/press-releases/press-releases-details/2024/OpenText-Completes-Divestiture-of-Application-Modernization-and-Connectivity-AMC-Business-to-Rocket-Software-for-2.275B/default.aspx
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1914>
2025-04-15 13:49:13 -04:00
Alan Coopersmith 845c4ae518 Xserver.man: correct list of available authorization protocols
XDM-AUTHORIZATION-2 (IPv6 capable version of -1) was never merged.
SUN-DES-1 was removed by commit 71b207a2e in 2024
MIT-KERBEROS-5 was removed by commit dfbe32b5b in 2007

Fixes: 71b207a2e ("os: drop SUN-DES-1 authentication")
Fixes: dfbe32b5b ("Remove the old Kerberos 5 authentication code.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1913>
2025-04-14 18:47:05 -07:00
Alan Coopersmith 80ad8a2c6d Xserver.man: add Xwayland(1) to list of server-specific man pages
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1913>
2025-04-14 15:56:34 -07:00
Alan Coopersmith b9c31cc9bc Xserver.man: allow line breaks in default font path
Allows nroff to insert a line break between iterm in the font path
instead of displaying it as a single, very overlength line.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1891>
2025-04-12 17:18:37 +00:00
Peter Hutterer cab9017485 dix: pick the right keyboard for focus FollowKeyboard
This fixes a crash when we try to send focus events and dereference
FollowKeyboardWin (0x3) as WindowPtr.

A device set to XSetDeviceFocus(FollowKeyboard) is supposed to follow
the focus of the corresponding master device. During ActivateKeyboard
a slave device is detached from the master for the duration for the grab
so we don't actually have a master to follow - leaving our oldWin set to
the FollowKeyboardWin constant. This later crashes when we try to
dereference it.

Fix this by getting the current master (if any), or the saved master (if
temporarily detached due to a grab). And if failing that, use the VCK
as fallback device - that is technically wrong but it's such a niche use
case that it shouldn't matter.

Reproducer:
     window = XCreateSimpleWindow(...)
     deviceid = any device that is IsXExtensionKeyboard device
     XSetDeviceFocus(deviceid, FollowKeyboard, ...)
     XGrabDevice(deviceid, window, ...)

Fixes: f01ee198ff ("dix: don't use inputInfo.keyboard to get the focus window in ActivateKbdGrab")

Found-by: Olivier Fourdan <ofourdan@redhat.com>
Acked-by: Olivier Fourdan <ofourdan@redhat.com>
Tested-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1870>
2025-04-07 15:45:50 +00:00
Enrico Weigelt, metux IT consult c445167da6 xwayland: no need to use WriteReplyToClient()
The WriteReplyToClient() macro is used for cases where byte swapping
is implemented in a separate callback function (set in a global vector
table). Since Xwl extension doesn't have such a callback, but does the
byte swapping directly in it's request handlers, there's no need to
call the WriteReplyToClient() macro - we can use WriteToClient() instead.

Fixes: 2700bc6045 - xwayland: add support for the XWAYLAND extension
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1878>
2025-04-07 07:47:30 +00:00
Enrico Weigelt, metux IT consult 32b3328e49 kdrive: Xkdrive.man: remove stray whitespace
Tiny editorial correction: drop a stray whitespace in manpage
that sneaked in at recent editorial changes.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1876>
2025-04-02 00:54:31 +00:00
Enrico Weigelt, metux IT consult 52c2cb7439 ci: fix missing runner tag on FreeBSD jobs after gitlab migration
All jobs utilizing kvm (eg. FreeBSD) need the "kvm" runner tag set.
It used to work w/o it, since all runners did have kvm, but in the
new CI there are non-kvm runners, so we really need to set the tag.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1872>
2025-04-01 18:02:55 +00:00
Alan Coopersmith 5ac0a19e7f man pages: use .BR to mark up man page references
The name of a man page is typeset in bold and the section in roman
(see man-pages(7)).

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1875>
2025-03-29 13:36:54 -07:00