Commit Graph

21878 Commits

Author SHA1 Message Date
kohnish
166dec4701 Fix missing include and signature mismatch on gentoo linux 2025-10-20 10:25:28 +02:00
Enrico Weigelt, metux IT consult
437515032b Xi: inline SProcXGetDeviceMotionEvents()
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-20 10:01:40 +02:00
Enrico Weigelt, metux IT consult
302533aac8 Xi: inline ProcXSetDeviceFocus()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-20 10:01:19 +02:00
Enrico Weigelt, metux IT consult
5330084bd5 xkb: inline SProcXkbSetMap()
No need to have whole extra functions for just a few LoC.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-20 10:00:41 +02:00
callmetango
24a4dd4606 README.md: updated links to new packaging repository pt2
Updated remaining links to new packaging repository and the discussions
moved there.

Part-of: X11Libre/misc#406
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-10-17 09:46:20 -04:00
Enrico Weigelt, metux IT consult
be69bc3aae Xext: shm: fix missing ScreenClose hook registration
ShmScreenClose() needs to be registered as ScreenClose hook into
all screens - otherwise it won't be called and so we're missing
cleanup work.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-14 19:45:15 +02:00
stefan11111
214d0e67de xfree86/common: Match drivers "modesetting" and "nvidia" on nvidia cards
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-10-14 10:39:22 +02:00
callmetango
9b94133f1c README.md: fixed some misspellings
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-10-13 11:42:14 -04:00
callmetango
163c5a495b README.md: updated links to new packaging repository
* updated links to new packaging repository and the discussions moved
  there
* removed links to the creation of DEB and RPM packages since this has
  been done

Fixes: X11Libre/misc#406
Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-10-13 11:42:14 -04:00
stefan11111
036432980b modesetting: Initialize the cursor image with the smallest size supported by all CRTCs.
We try to find the smallest size we can use for the cursor image.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-10-13 14:01:04 +02:00
stefan11111
702625f028 modesetting: use MAX macro in more places
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-10-13 14:01:04 +02:00
Enrico Weigelt, metux IT consult
6730fd8251 dix: fix missing includes of extinit.h
Don't rely on this file just being included indirectly by somebody else
just by accident.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-07 11:07:00 +02:00
Enrico Weigelt, metux IT consult
a56e1665a1 dix: inline SProcPoly()
Yet another step for getting rid of the unnecessarily complicated SProc*
machinery. Later, all those swap*() calls will be replaced by macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-07 11:06:37 +02:00
Enrico Weigelt, metux IT consult
92af1b26ff render: consolidate byte-swapping in ProcRenderTriStrip()
No need for extra functions and call tables for the few trivial lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-07 10:55:23 +02:00
Enrico Weigelt, metux IT consult
81a8619bda dix: replace XACE_CLIENT_ACCESS by direct callback
Replace complicated xace hook by simple and cheap callback.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-07 10:52:54 +02:00
Enrico Weigelt, metux IT consult
0f0164882f Xi: inline SProcXGetExtensionVersion()
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-03 17:27:58 +02:00
stefan11111
4984b12967 modesetting: Use the same cursor mask interleave as other drivers
There is no explanation for these values, but the one we are
currently using doesn't work.

Use the values from vendor-speciffic drivers, which do work.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-10-02 18:49:40 +02:00
stefan11111
bbcf22183a modesetting: Only use the querried fallback if both querries succeed
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-10-02 18:49:40 +02:00
stefan11111
25cae34122 modesetting: add braces around an if
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-10-02 18:49:40 +02:00
stefan11111
d5162b4493 modesetting: Handle cursor images and buffers smaller than 64x64 correctly
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-10-02 18:49:40 +02:00
stefan11111
5752116343 modesetting: Clear the cursor buffer explicitly
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-10-02 18:49:40 +02:00
Alan Coopersmith
0616df4a76 panoramix: avoid null dereference in PanoramiXMaybeAddDepth()
Reported in https://gitlab.freedesktop.org/xorg/xserver/-/issues/1817:

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:748:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘PanoramiXDepths’
xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:802:1: enter_function: entry to ‘PanoramiXConsolidate’
xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:813:17: branch_true: following ‘true’ branch...
xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:814:9: branch_true: ...to here
xwayland-24.1.6/redhat-linux-build/../Xext/panoramiX.c:814:9: call_function: calling ‘PanoramiXMaybeAddDepth’ from ‘PanoramiXConsolidate’
746|       PanoramiXDepths = reallocarray(PanoramiXDepths,
747|                                      PanoramiXNumDepths, sizeof(DepthRec));
748|->     PanoramiXDepths[j].depth = pDepth->depth;
749|       PanoramiXDepths[j].numVids = 0;
750|       PanoramiXDepths[j].vids = NULL;

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2065>
2025-10-02 18:46:33 +02:00
stefan11111
2ee7e9bc92 Xext/panoramix.c: #include "os/osdep.h"
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-10-02 18:46:33 +02:00
Mikhail Dmitrichenko
de025ce306 dix: avoid null ptr deref at doListFontsWithInfo
In the doListFontsWithInfo function in dixfonts.c, when a font alias is
encountered (err == FontNameAlias), the code saves the current state
and allocates memory for c->savedName.

If the malloc(namelen + 1) call fails, c->savedName remains NULL,
but c->haveSaved is still set to TRUE. Later, when a font is
successfully resolved (err == Successful), the code uses c->savedName
without checking if it is NULL, so there is potential null ptr
dereference. XNFalloc will check result of malloc and stop
program execution if allocation was failed.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1842

Signed-off-by: default avatarMikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2062>
2025-10-02 18:46:33 +02:00
Enrico Weigelt, metux IT consult
0a5815b075 render: consolidate byte-swapping in ProcRenderTriangles()
No need for extra functions and call tables for the few trivial lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-02 14:50:14 +02:00
Enrico Weigelt, metux IT consult
a41273572f xfree86: fix missing includes of extinit.h
Don't rely on this file just being included indirectly by somebody else
just by accident.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-01 14:46:26 +02:00
Enrico Weigelt, metux IT consult
19921fd401 dix: unexport ConnectionInfo field
Not used by any drivers, so no need to keep it in public SDK.
Since it's not used by any drivers, effectively no ABI change, so
can be safely done within ABI-25.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-01 11:42:50 +02:00
Enrico Weigelt, metux IT consult
962580a15a treewide: macros lambda-esque screen iteration
iterating over screen list via lambda-esque macros calls like this

    DIX_FOR_EACH_SCREEN({
        do_something
    });

withing the body, the iterator variables `walkScreenIdx` and `walkScreen`
are defined and can be directly used (read-only). the code inside the body
is running in a separate scope.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-01 11:40:34 +02:00
Enrico Weigelt, metux IT consult
eaff5ba96c dix: ProcLookupColor(): simplify code flow
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-30 10:01:28 +02:00
Enrico Weigelt, metux IT consult
bff6f86afc render: consolidate byte-swapping in ProcRenderTrapezoids()
No need for extra functions and call tables for the few trivial lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-30 10:01:11 +02:00
Enrico Weigelt, metux IT consult
24c422177f xkb: inline SProcXkbLatchLockState()
No need to have whole extra functions for just a few LoC.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-30 10:00:56 +02:00
Enrico Weigelt, metux IT consult
7f25e705f5 Xi: inline SProcXGetDeviceDontPropagateList()
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-30 10:00:35 +02:00
Enrico Weigelt, metux IT consult
7319dc09eb dix: simplify PolyText(), ProcImageText8(), ProcImageText16()
Don't need to store and branch on error value, just return it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-30 09:59:04 +02:00
Enrico Weigelt, metux IT consult
53bae08ed0 Xi: inline SProcXGetSelectedExtensionEvents()
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-30 09:58:12 +02:00
Enrico Weigelt, metux IT consult
d58de12e73 Xext: xres: inline SProc*()'s
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-30 09:57:36 +02:00
Enrico Weigelt, metux IT consult
b306691c2d win32: move definition of sigset_t to os/osdep.h
Not needed by drivers (there aren't any on win32), so no need to
have it in public SDK header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 19:13:49 +02:00
Alexandre Janon
16ee02ab67 dix: ensure that event fix-up is not performed on core events
CoreEnterLeaveEvent calls FixUpEventFromWindow with a pointer to a stack-allocated xEvent structure, which may get later casted into an xXIDeviceEvent*, with writes done by FixUpXI2DeviceEventFromWindow at an offset larger than sizeof(xEvent). This code-path is protected by xi2_get_type() but the following warning is generated by building with -O3 and LTO:

In function 'FixUpXI2DeviceEventFromWindow',
    inlined from 'FixUpEventFromWindow' at ../dix/events.c:2716:13,
    inlined from 'CoreEnterLeaveEvent' at ../dix/events.c:4679:5:
../dix/events.c:2628:48: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 2628 |         ((xXIEnterEvent *) event)->same_screen =
      |                                                ^
../dix/events.c: In function 'CoreEnterLeaveEvent':
../dix/events.c:4652:12: note: at offset 48 into destination object 'event' of size 32
 4652 |     xEvent event = {
      |            ^

This PR suppresses this warning, by tracking the level of the event (ie., core event, XI or XI2) and ensuring that fix-up is performed only on XI2 events.

Signed-off-by: alex14fr <alex14fr@gmail.com>
2025-09-29 17:15:16 +02:00
Enrico Weigelt, metux IT consult
5ccaceb43c dix: inline SProcResourceReq()
Simplifying byte-swapping code flow by inlining SProcResourceReq()
instead of having complicated call chains.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 13:57:06 +02:00
sesankm
794a3f3630 glx: glxcmds: use rpcbuf to build xGLXGetVisualConfigsReply payload
Signed-off-by: sesankm <26676400+sesankm@users.noreply.github.com>
2025-09-29 12:35:20 +02:00
sesankm
129ce12788 dix: rpcbuf: export x_rpcbuf_write_reserve0 for glx
Signed-off-by: sesankm <26676400+sesankm@users.noreply.github.com>
2025-09-29 12:35:20 +02:00
Enrico Weigelt, metux IT consult
5e38615365 randr: inline byte-swapping into actual request handlers
No need to have whole extra functions for just a few LoC, and in the
future the whole thing will become more simplified by generic macros.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 12:35:03 +02:00
Enrico Weigelt, metux IT consult
b2a85f070d xwin: dri: inline byte-swapping
No need for having extra functions and redundant code when it can
be done with just few LoC.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 12:34:42 +02:00
Enrico Weigelt, metux IT consult
9a2dc644b7 xquartz: applewm: drop redundant dispatcher for swapped case
There's nothing actually do be done by the swapped dispatcher, the
original already does everything on its own.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:24:43 +02:00
Enrico Weigelt, metux IT consult
9353255c9d xquartz: appledri: inline byte-swapping
No need for having lots of extra functions and redundant dispatcher,
when it can be done by directly inlining those few LoC.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:24:28 +02:00
Enrico Weigelt, metux IT consult
8e68c8d514 dix: replace XACE_CLIENT_ACCESS by direct callback
Move the callbacks directly into DIX, since it's actually core infrastructure.
Also simplifying the whole machinery, by just using a simpel CallbackListPtr.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:24:13 +02:00
Enrico Weigelt, metux IT consult
3851c97247 xv: drop forgotten SProcXvDispatch() prototype
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:23:48 +02:00
Enrico Weigelt, metux IT consult
8a5ac961ca Xvmc: inline SProcXvMCDispatch()
No need for an extra function for a one-liner.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:23:36 +02:00
Enrico Weigelt, metux IT consult
3bec112cf1 dix: drop obsolete SProcSimpleReq()
This function is really doing nothing except of calling into the
actual request handler, so not needed at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:23:21 +02:00
Enrico Weigelt, metux IT consult
6731d7643a render: consolidate byte-swapping in ProcRenderFreePicture()
No need for extra functions and call tables for the few trivial lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:22:15 +02:00
Enrico Weigelt, metux IT consult
07ac2c2c99 Xi: inline SProcXGrabDeviceButton()
No need to have a hole bunch of extra functions, if we can just easily
inline the few relevant lines.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-29 11:22:03 +02:00