Alan Coopersmith
d854a473bf
dix: enterleave.c: fix implicit fallthrough warnings
...
Clears 7 -Wimplicit-fallthrough warnings from gcc 14.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1673 >
(cherry picked from commit 0cb826e3d0 )
2026-01-25 10:39:57 -08:00
Alan Coopersmith
365b353cad
dix: SetFontPath: don't set errorValue on Success
...
Clears warning from gcc 14.1:
../dix/dixfonts.c: In function ‘SetFontPath’:
../dix/dixfonts.c:1697:28: warning: use of uninitialized value ‘bad’
[CWE-457] [-Wanalyzer-use-of-uninitialized-value]
1697 | client->errorValue = bad;
| ~~~~~~~~~~~~~~~~~~~^~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1673 >
(cherry picked from commit 1a86fba0d9 )
2026-01-25 10:39:57 -08:00
Alan Coopersmith
52714045bb
dix: PolyText: fully initialize local_closure
...
Clears warning from gcc 14.1:
../dix/dixfonts.c:1352:15: warning: use of uninitialized value ‘*c.data’
[CWE-457] [-Wanalyzer-use-of-uninitialized-value]
1352 | free(c->data);
| ~^~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1673 >
(cherry picked from commit d78836a3a6 )
2026-01-25 10:39:57 -08:00
Alan Coopersmith
0f0ba06289
dix: check for calloc() failure in Xi event conversion routines
...
Clears up 12 -Wanalyzer-possible-null-dereference warnings from gcc 14.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1673 >
(cherry picked from commit 25762834c9 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
4e5d92a466
ci: add FreeBSD build
...
Build the Xserver in FreeBSD VM.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1425 >
(cherry picked from commit 94998e3a1d )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
b0624e99d4
ci: use master branch of xf86-video-qxl driver
...
Need some fixes not in a tagged release yet.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1425 >
(cherry picked from commit c41bb2049e )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
0bbed178b1
Xext: xf86bigfont: code styling cleanups
...
* tidy up the includes into logic order.
* beautify function prototype
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1600 >
(cherry picked from commit 866f3261c4 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
fe6936a8e6
Xext: xf86bigfont: drop some dead code
...
There's some piece ifdef'ed code that doesn't serve any practical purpose.
Instead add a little comment telling why that funny way of dispatching
(based on request size) is necessary.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1600 >
(cherry picked from commit 7735c4462c )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
9c6593dad7
os: unexport CloseDownConnection()
...
Not used by any drivers, so no need to export it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1582 >
(cherry picked from commit 1d7cb4b2c3 )
2026-01-25 10:39:56 -08:00
Olivier Fourdan
3214f27439
build: Fix DRI3 on DragonFly and OpenBSD
...
Commit 96bdc156 added a check for <sys/eventfd.h> to enable DRI3.
DragonFly and OpenBSD however rely on epoll-shim for <sys/eventfd.h>,
so that must be added as a dependency for the <sys/eventfd.h> check.
Fixes: commit 96bdc156 - xwayland: Do not enable DRI3 without eventfd
Suggested-by: Jan Beich <jbeich@freebsd.org >
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1642 >
(cherry picked from commit 8fe15a60c5 )
2026-01-25 10:39:56 -08:00
Olivier Fourdan
fd90e04744
build: Add epoll to Xwayland for DragonFly and OpenBSD
...
DragonFly and OpenBSD rely on epoll-shim for <sys/eventfd>, add a
optional dependency to build Xwayland.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1642 >
(cherry picked from commit 7bcf2bcafc )
2026-01-25 10:39:56 -08:00
Olivier Fourdan
274c600599
build: Move epoll dependency check
...
DragonFly and OpenBSD rely on epoll-shim to provide eventfd.
Move the check for epoll dependency to the root meson.build script so
that we can use that for the <sys/evenfd.h> check as well.
This is preparation work for the following commits, no functional change
intended at this point.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1642 >
(cherry picked from commit 673b56e61c )
2026-01-25 10:39:56 -08:00
Matthieu Herrb
92aea1efeb
Fix a double-free on syntax error without a new line.
...
$ echo "#foo\nfoo" > custom_config $ X -config custom_config
will trigger the double free because the contents of xf86_lex_val.str
have been realloc()ed aready when free is called in read.c:209.
This copies the lex token and adds all the necessary free() calls to
avoid leaking it
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1176 >
(cherry picked from commit fbc034e847 )
2026-01-25 10:39:56 -08:00
Peter Hutterer
f88df2a527
Xi: when removing a master search for a disabled paired device
...
If either the master pointer or keyboard was disabled, the respective
GetMaster() call returns NULL, causing a segfault later accessing the
deviceid.
Fix this by looking in the off_devices list for any master
device of the type we're looking for. Master devices lose the pairing
when disabled (on enabling a keyboard we simply pair with the first
available unpaired pointer).
And for readability, split the device we get from the protocol request
into a new "dev" variable instead of re-using ptr.
Fixes #1611
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1256 >
(cherry picked from commit e7c876ab0b )
2026-01-25 10:39:56 -08:00
Peter Hutterer
4374fbb8a0
dix: don't push the XKB state to a non-existing master keyboard
...
If our master keyboard is disabled, GetMaster() returns NULL and
we segfault in XkbPushLockedStateToSlaves().
Fixes 45fb3a934d
Fixes #1611
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1256 >
(cherry picked from commit 9b983fecf9 )
2026-01-25 10:39:56 -08:00
Matthieu Herrb
d09eca6f61
Return NULL in *cmdname if the client argv or argv[0] is NULL
...
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/995 >
(cherry picked from commit 59f5445a7f )
2026-01-25 10:39:56 -08:00
Matthieu Herrb
d09b70b4e0
Don't crash if the client argv or argv[0] is NULL.
...
Report from bauerm at pestilenz dot org.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/995 >
(cherry picked from commit a8512146ba )
2026-01-25 10:39:56 -08:00
moozcheng
00c769ac03
dix: fix a misused const pointer in cursor.c
...
`const CursorPtr` actually means `struct _Cursor *const`, a constant pointer, which does not prevent you from accidentally modifying the value it points to, like the cursor refcnt.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1140 >
(cherry picked from commit 96079f8c68 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
2056850f31
include: unexport XIstubs.h
...
The functions declared here aren't used by any driver, so no need to keep
them in the public driver API. Since the whole file isn't included by anybody
outside the xserver tree itself, it doesn't need to be installed at all,
so making it internal and move it to Xi directory.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1325 >
(cherry picked from commit 03eb593460 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
289e0cd3d5
dix: move internal defines into colormap.c
...
These are really internal to colormap.c, so move them there.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581 >
(cherry picked from commit 7ba3fc3a54 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
db65af7796
include: colormap.h: drop unused defines
...
These aren't used anywhere, so we can drop them.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581 >
(cherry picked from commit cbf5d88352 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
cb05132afa
include: colormap.h: drop unused typedef colorResourcePtr
...
This typedef isn't used anywhere, so can be dropped.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581 >
(cherry picked from commit 7c03549134 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
eb685f5dba
os: utils: drop obsolete REMOVE_ENV_LD conditional
...
This always had been set since it's incarnation back two decades
ago, on XFree86 4.3.0.1. Probably no need to keep that around anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1518 >
(cherry picked from commit aef17edd92 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
12fc68d5d4
os: utils: drop unused USE_ISPRINT
...
This always had been disabled since it's incarnation XFree86 4.3.0.1,
back two decades ago, so there's likely no need for it.
Fixes: d568221710
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1518 >
(cherry picked from commit 4b94e4fa08 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
b7587614b9
os: utils: drop REMOVE_LONG_ENV conditional
...
This always had been enabled since it's incarnation back two decades ago,
so it doesn't seem to be necessary keeping that conditional any longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1518 >
(cherry picked from commit b5d897d126 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
1ce6028cb0
os: utils: drop unused NO_OUTPUT_PIPES
...
This hasn't been used/enabled for over 20 years, so there's probably
no reason for keeping it even longer.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1518 >
(cherry picked from commit 69905a0a28 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
8bd4dc6806
os: utils: minor code formatting cleanup
...
Just correcting some small indention issues, no actual change.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1518 >
(cherry picked from commit 6153b89d19 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
6ceebf6cf5
os: unexport WaitForSomething()
...
Not used by any drivers, so no need to export it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1584 >
(cherry picked from commit 3d3d148039 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
9b1e1dc2c4
include: dixfontstr.h: drop silent dependency on libxfont2
...
This header includes libxfont2.h, but the dependency isn't stated anywhere,
causing some drivers to FTBS (when libxont2.h is in non-standard location).
Since this header doesn't seem to need including libxfont2.h at all, just
stop including it, instead of adding yet another dependency to server SDK.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1610 >
(cherry picked from commit 646831cda2 )
2026-01-25 10:39:56 -08:00
Alan Coopersmith
e56d8c9ccc
Remove remnants of support for SVR4 systems other than Solaris & illumos
...
Most of the support for such OS'es was removed in 2010 for
xorg-server-1.10.0, but a few bits lingered on.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1667 >
(cherry picked from commit 62c9f52e41 )
2026-01-25 10:39:56 -08:00
Alan Coopersmith
eed43d1446
Remove remnants of support for SysV versions before SVR4
...
Most of the support for such OS'es was removed in 2010 for
xorg-server-1.10.0, but a few bits lingered on, and a few
comments were left out-of-date.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1667 >
(cherry picked from commit f35951d83e )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
b3151b79be
Xnest: use Xorg's TRUE/FALSE instead of Xlib's True/False
...
Use Xserver's defines instead of Xlib's ones. The values are the same.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1657 >
(cherry picked from commit 12f71ede8a )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
73c2809b55
Xnest: split off event handler
...
Tidy it up a bit and split the actual request handler from the request
reading loop, making upcoming reworks easier to review (smaller diffs).
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1661 >
(cherry picked from commit 0d3ae98661 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
d75af800b5
Xnest: xnestCollectEvents(): scope local variables
...
Make the code easier to read/understand by scoping variables to where
exactly they're needed. Also a preparation for subsequent reworks
(keep the diff smaller and thus easier to review)
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1661 >
(cherry picked from commit 3597323d48 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
cca7f3c4e7
Xnest: fix broken exposure events
...
Xnest fails to properly pass through expose events: the coordinates are
miscalculated in xnestCollectExposures(), before miSendExposures() is called.
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1735
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1634 >
(cherry picked from commit e1c47ad123 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
25c842f942
Xnest: Display.h: fix missing include of colormap.h
...
Needs some types (eg. Pixel) from colormap.h
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1660 >
(cherry picked from commit ea042cd6ef )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
4117362de1
Xnest: XNGC.h: add missing includes
...
This header makes use of types and functions defined in gcstruct.h and
privates.h. It should include them, instead of demanding it's consumers
having done that before including this file.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1659 >
(cherry picked from commit 4db1da86fc )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
0356e5e7e8
Xnest: add guards to Xnest.h
...
protect it from duplicate inclusion.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1658 >
(cherry picked from commit eafd687c47 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
baa2aca9e2
test: dix_input_valuator_masks(): use fixed array instead of VLA
...
The array size is determined on compile time, so no need to use a vla
which always has the same size anyways.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1663 >
(cherry picked from commit 1bea5ddfce )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
63dd5c4af6
os: backtrace: use fixed size array instead of vla
...
The backtrace buffer size (BT_SIZE) is determined by compile time,
so we can change BT_SIZE into a #define to turn vla into fixed array.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1664 >
(cherry picked from commit 6531720c7c )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
a854d31246
doc: drop removed functions from the Xserver spec
...
The recently dropped mi functions shouldn't be described as "provided by MI"
anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1502 >
(cherry picked from commit 588b97b932 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
192d3bb57a
mi: drop obsolete mibitblt.c
...
This file is practically empty now, so we can remove it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1502 >
(cherry picked from commit a716484926 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
81e9e80a87
mi: drop unused miPutImage()
...
With removal of Xwin's NATIVEGDI (back a decade ago), the last caller is
gone, and it also doesn't seem to be called by any driver.
Fixes: 8465ee788f
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1502 >
(cherry picked from commit af2b29106d )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
099b804d4a
mi: drop unused miGetImage()
...
With removal of Xwin's NATIVEGDI (back a decade ago), the last caller is
gone, and it also doesn't seem to be called by any driver.
Fixes: 8465ee788f
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1502 >
(cherry picked from commit c0589e228c )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
786f8c46c9
mi: drop unused miCopyArea()
...
With removal of Xwin's NATIVEGDI (back a decade ago), the last caller is
gone, and it also doesn't seem to be called by any driver.
Fixes: 8465ee788f
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1502 >
(cherry picked from commit e89ed59c94 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
00345a6f6c
mi: drop unused miCopyPlane()
...
With removal of Xwin's NATIVEGDI (back a decade ago), the last caller is
gone, and it also doesn't seem to be called by any driver.
Fixes: 8465ee788f
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1502 >
(cherry picked from commit c90543968b )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
faf2e3dcc4
treewide: fix indentions got broke by recent commit
...
Commit f26f17c66a broke some indentions,
fixing them now.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1662 >
(cherry picked from commit c4481fc20f )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
797b3c6c31
Xnest: Keyboard: drop unnecessary include
...
<X11/extensions/XKBconfig.h> isn't needed, so drop it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1649 >
(cherry picked from commit 720651ebf3 )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
ca1b049800
Xnest: cursor: fix potentially uninitialized memory
...
It's safer to zero-out the cursor-private memory on allocation,
instead of relying on being cleared initialized somewhere later.
Fixes: 3f3ff971ec - Replace X-allocation functions with their C89 counterparts
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1652 >
(cherry picked from commit 8d5584558f )
2026-01-25 10:39:56 -08:00
Enrico Weigelt, metux IT consult
8869bd31ae
treewide: mark pGC->ops->CopyArea() calls not using result as void
...
We alread have several of these calls, that aren't interested in result value,
explicitly casting to void. Fixing this up for the remaining ones.
This is helpful for the human reader as well as quality analysis tools.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1648 >
(cherry picked from commit f26f17c66a )
2026-01-25 10:39:56 -08:00