Commit Graph

20864 Commits

Author SHA1 Message Date
Enrico Weigelt d9fc870293
Merge 9ddc54918a into d403cbd25c 2025-07-04 14:51:57 -04:00
stefan11111 d403cbd25c kdrive: ephyr: initialize OS specific callback vectors
These will be used by subsequent commits for generic Kdrive
functions calling back into the OS specific parts

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-04 19:36:04 +02:00
stefan11111 a46fd9f16e kdrive: add KdOsInit
Kdrive X servers used to do the OS-speciffic init part using KdOsInit.
This was changed in modern Xorg because Xephyr is the only kdrive
X server there, so there was no need to keep this generic.
Since we want to eventually add Xfbdev, we need to add this back.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-04 19:36:04 +02:00
Enrico Weigelt, metux IT consult fc9bd6b175 minor release 25.0.0.4
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:26:48 +02:00
Enrico Weigelt, metux IT consult d338bf6e68 namespace: drop unused winIsRoot()
Not used in this file, so no need to keep it around anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:11:54 +02:00
Enrico Weigelt, metux IT consult c6777fe48e xnest: drop unused DarwinHandleGUI()
Obsolete since 17 years now, probably just forgotten to clean up.

Fixes: ef1c520537
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:10:02 +02:00
Enrico Weigelt, metux IT consult 2f46a02217 vfb: drop unused DarwinHandleGUI()
Obsolete since 17 years now, probably just forgotten to clean up.

Fixes: ef1c520537
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:10:02 +02:00
Enrico Weigelt, metux IT consult 93013224b4 xquartz: fix incomplete prototype of executable_path()
> ../hw/xquartz/mach-startup/bundle_trampoline.c:53:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
> static char *executable_path() {
>                             ^
>                              void
> 1 warning generated.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:09:33 +02:00
Enrico Weigelt, metux IT consult 74d5b7bb05 xquartz: drop unused field declarations in request handlers
Silence compiler warning on unused fields, eg.:

> ../hw/xquartz/applewm.c:692:5: warning: unused variable 'stuff' [-Wunused-variable]
>     REQUEST(xAppleWMQueryVersionReq);
>     ^
> ../include/dix.h:65:12: note: expanded from macro 'REQUEST'
>     type * stuff = (type *)client->requestBuffer;
>            ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:08:46 +02:00
stefan11111 160ab343ea mi: move miPointerCloseScreen to hookPostClose
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-03 18:46:58 +02:00
Enrico Weigelt, metux IT consult 2069db50e7 xfree86: compat: make xf86MsgVerb() a bit less noisier
print the driver bug warning only once.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-03 16:55:14 +02:00
Nathan Kidd 7ca8b37ab1 glx: Don't blindly write 8 bytes in GLX single replies
Previously we leaked stack when invalid enum parameters were
specified and caused __glGet*_size functions to return a 0 size.

Further, we read out-of-bounds (and leaked) when the input data was less
than 8 bytes (__glXDispSwap_GetFramebufferAttachmentParameteriv and
__glXDisp_GetRenderbufferParameteriv).

Now we only write a single element in the reply padding, and only when there
is a single element. This is what the Mesa client-side libGL expects, and
restores original GLX server behaviour, matching both pre-public (1996) SGI GLX
and XFree86 4.

The main risk of this change is if we have any error in element count or size;
previously it may not have mattered but now it does.

There are no piglit result changes from this modification using either mesa
libGLX or NVIDIA libGLX.

For performance considerations, an extra conditional and variable-length
memcpy has no meaningful impact on the indirect rendering pipeline cost.

There is still the possiblity to leak if our size checks allow an enum that
the GL implemention does not. Guarding against that requires zero-initializing
all temp storage, which wants re-evaluation of the blind 200-byte buffers
used for many calls and thus is a much bigger change.

Signed-off-by: Nathan Kidd <nkidd@rocketsoftware.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1647>
2025-07-03 16:43:18 +02:00
Nathan Kidd 5b810bac5e glx: Fix out-of-bounds reads from negative return
The callers of these functions were casting -1 to unsigned and then
using 4GB indexes. By returning 0 we match all the other size functions.

GLX size functions return -1 to indicate error, but GL size functions return 0.

Signed-off-by: Nathan Kidd <nkidd@rocketsoftware.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1647>
2025-07-03 16:43:18 +02:00
dasha_uwu 7c64a06ba4 treewide: remove "lib" prefix in static_library names (meson)
this was producing static libraries named "liblibsomething.a"

Signed-off-by: dasha_uwu <dasha@linuxping.win>
2025-07-03 12:01:52 +02:00
Enrico Weigelt, metux IT consult 5d7be80305 minor release 25.0.0.3
minor bugfix release.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-02 17:44:12 +02:00
stefan11111 6851e17816 meson.build: meson_options.txt: add build option to disable building tests
These tests take a long time to build and link, especially with lto.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-02 17:40:10 +02:00
Enrico Weigelt, metux IT consult 96be335fd3 miext: damage: use dixScreenHookPostClose() instead of dixScreenHookClose()
Some drivers need to call into damage from within their CloseScreen proc,
so damage teardown needs to be done after that, instead of before.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-02 15:41:37 +02:00
Enrico Weigelt, metux IT consult 56650ba873 dix: add screen hook for post-close
In contrast to the already existing ScreenClose hook, this one is
called *after* the driver's CloseScreen() proc. That's required for
some extensions (eg. damage) where drivers still need to call in
inside of their CloseScreen procs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-02 15:41:37 +02:00
Enrico Weigelt, metux IT consult 4036b8c163 os: log: vpnprintf(): ignore reverse justification modifier
The only caller is libinput, and we don't really need it, just silencing
bug message.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-01 17:15:56 +02:00
Enrico Weigelt, metux IT consult c24372893b xfree86: compat: consolidate logging
Consolidate the redundant warnings into generic functions.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-01 17:11:28 +02:00
Enrico Weigelt, metux IT consult 28e739e05b xfree86: loadmod: locally scope the errtype variable
In CheckVersion() the errtype variable is used in two separate scopes,
but not globally, so it's cleaner to have it only in the scopes that
are actually using it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-01 17:03:12 +02:00
Enrico Weigelt, metux IT consult a4c3c9da4d xf86bigfont: fix compiler warning on unused variable
> ../Xext/xf86bigfont.c: In function ‘SProcXF86BigfontQueryVersion’:
> ../include/dix.h:65:12: warning: unused variable ‘stuff’ [-Wunused-variable]
>   65 |     type * stuff = (type *)client->requestBuffer;

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-01 17:01:07 +02:00
stefan11111 3d266528a9 kdrive: ephyr: use c99 struct initialization
For better readability and robustness against future changes, it's
better to use named struct initializers instead of array-like lists.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-01 16:50:01 +02:00
Tautvis 6c2f17a5e0 xf86vidmode: fix result copying in ProcVidModeGetMonitor()
The monitor values (vendor and model) accidentally had been copied
at the start of the payload, instead of being appended after the
previously copied data, and also moving the wrong pointer, thus
corrupting the reply and causing some clients to hang.

Signed-off-by: Tautvis <gtautvis@gmail.com>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-01 15:58:44 +02:00
Enrico Weigelt, metux IT consult 6a3162d623 Xnest: fix analyzer warning on uninitialized `DefaultVisual`
In xnestOpenScreen(), some compilers/analyzers spitting out a false alarm on
`defaultVisual` field potentially used uninitialized. This can't practically
happen, but not all compilers/analyzers really can see that.

Adding a zero initializer doesn't cost us anything, so silencing that false
alarm is trivial.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 20:30:46 +02:00
Enrico Weigelt, metux IT consult ccf9787bd6 .github: add building mouse driver
xf86-input-mouse is now supported Linux again, so add it to the build.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 19:22:01 +02:00
Enrico Weigelt, metux IT consult 9ddc54918a os: xtrans: fix calloc overflow warning
The size of `int` is machine specific and may be 64 bits wide, which could
overflow the calloc'able size. Practically cannot happen here, since the
ListenTransCount can't go above MAX_CONNECTIONS, but compiler can't know
that and so spitting out a warning.

Using uint32_t really is sufficient here.

> ../os/connection.c: In function ‘CreateWellKnownSockets’:
> ../os/connection.c:274:22: warning: argument 1 range [18446744071562067968, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
>   274 |     ListenTransFds = calloc(ListenTransCount, sizeof(int));
>       |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:23:46 +02:00
Enrico Weigelt, metux IT consult cc39bf7745 os: log: vpnprintf(): ignore reverse justification modifier
The only caller is libinput, and we don't really need it, just silencing
bug message.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult 5d0b9f4508 os: xtrans: expand TRANS() macro to _XSERVTrans
Since TRANS() now will always expand the same, it's better for
maintenance, having the function names written explicitly.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult 8b3ab3586c os: xtrans: drop GetReopenInfo()
Not used anywhere, so no need to keep it around anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult cbcb9718ef os: xtrans: drop ifdefs on NAMEDNODENAME
It's always defined, so no ifdefs needed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult 053f43e6ae os: xtrans: drop DEV_PTMX
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult 1d57896358 os: xtrans: drop TRANS_CLIENT code pathes
Not needed in server-only code base.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult c62c0f093f os: xtrans: drop XSERV_t and x11_t defines
These are always enablde (x11_t is defined when XSERV_t is defined),
so no need for the #ifdef's anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult f6dd15f8d4 os: xtrans: drop ifdef TRANS_REOPEN
It's always defined, so the guards aren't necessary.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult 13fd772406 os: xtrans: drop ifdef TRANS_SERVER
it's always defined, no extra guards needed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult 1dbc9d03ac os: xtrans: drop NEED_UTSNAME
All our supported platforms have this utsname.h.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult 00316d71a7 os: xtrans: drop _WILLWINSOCK_
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult 53de959813 os: xtrans: drop own VErrorF() and ErrorF()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult 258057b085 os: xtrans: replace bzero by memset
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult baf23b30d2 os: xtrans: drop XIM_t
Not defined anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult 70981fffb0 os: xtrans: drop FS_t
Not defined anywhere, so no need to keep it around anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult 6a2f1e7bdb os: xtrans: drop FONT_t
Not used anywhere, so no need to keep it around anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult be255fd059 os: xtrans: drop ICE_t
Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult 12da711d7c os: xtrans: drop GetMyNetworkId()
Not used anywhere, so lets drop it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult ada655a525 os: xtrans: drop unused GetPeerNetworkId()
Not used anywhere, so let's drop it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult 6f31730785 os: xtrans: drop X_NO_SYS_UN
Not defined anywhere, so no need to check for it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult 6a0c1a7d9f os: use internal xtrans instead of external library
Now that we've got xtrans bundled in our source tree, use this one and
drop the external dependency.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/691
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult 6080bcf5b8 os: incorporate xtrans xtrans-1.6.0
Copy over from xtrans package, tag xtrans-1.6.0

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 13:08:06 +02:00
Enrico Weigelt, metux IT consult d08631bef1 minor release 25.0.0.2
minor bugfix release.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 12:44:45 +02:00