Enrico Weigelt, metux IT consult
292f532495
Xnest: replace XCopyPlane() by xcb_copy_plane()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
69623b5201
Xnest: replace XCopyArea() by xcb_copy_area()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
c9a5867c44
Xnest: replace XDrawArcs() by xcb_poly_arc()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
2cf5b7a7c4
Xnest: replace XDrawRectangles() by xcb_poly_rectangle()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
eca602ea74
Xnest: replace XDrawSegments() by xcb_poly_segment()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
9a62a30ac2
Xnest: replace XDrawLines() by xcb_poly_line()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
f9760786c3
Xnest: replace XDrawPoints() by xcb_poly_point()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
d42b05345e
Xnest: replace XCreateColormap() / XFreeColormap() by xcb
...
Use xcb_create_colormap() and XFreeColormap() instead of XCreateColormap()
and XFreeColormap().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
b44911437c
Xnest: use xcb instead of XShapeCombineRegion() and XShapeCombineMask()
...
Using xcb_shape_rectangles() and xcb_shape_mask() instead of Xlib's
XShapeCombineRegion() and XShapeCombineMask().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
a0d6c9faea
Xnest: use xcb_put_image() for PutImage requests
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
b72e75cb47
Xnest: use xcb_put_image() for creating cursors
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
d374b585f9
Xnest: replace XCreatePixmapCursor() by xcb_create_cursor()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
90e0eb5dfe
Xnest: replace XConfigureWindow() calls by xcb_configure_window()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
578fbe50a1
Xnest: use xcb for creating / destroying pixmaps
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
c0ad499fa7
Xnest: replace XBell() by xcb_bell()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
68d13337d3
Xnest: use xcb for (un)mapping windows
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
b00f49f6b8
Xnest: replace XCreateWindow() by use xcb_create_window()
...
Need to add xcb-aux dependency for that.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
5fc7d95831
Xnest: fetch root visual ID from screen data
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
f4606dc8ab
Xnest: fetch keycode min/max from setup data
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
d856ccb066
Xnest: fetch image metrics from xcb connection setup data
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
10b63d1c03
Xnest: fetch default screen's root window from screen info
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
b160dc0f31
Xnest: add helper for retrieving GC XID on upstream connection
...
Upcoming patches will need to retieve GC's XIDs on the upstream connection.
Moving this out into separate .c file, in order to not creating more
dependencies on Xlib headers, which we wanna get rid of.
For now, looking at the Xlib GC structure, attached to our DDX GCs.
When all users of the Xlib GC have gone (ie. moved all consumers to xcb),
we'll create the GC via xcb directly, thus replacing the Xlib GC struct
by XID - the interface of this helper will remain the same.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
4629933e5f
Xnest: fetch default colormap from xcb screen info
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
9b4e251a60
Xnest: fetch root window depth from screen info
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
edd7788897
Xnest: fetch display size from xcb setup data
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
1b3d6525ed
Xnest: fetch BlackPixel and WhitePixel from xcb setup data
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
67c0162297
Xnest: fetch xcb setup data
...
Fetching the setup data from xcb instead of Xlib, storing in our own struct,
holding all information needed for one particular upstream connection.
For now, there's only one, but future multi-upstream implementation will
change this to an array (and storing pointers to particular upstream in
various places).
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
e561afd4c1
Xnest: use XCB_EVENT_MASK_* defines
...
Use xcb's defines instead of Xlib's ones.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
3a85d6db16
Xnest: use XCB*_NONE instead of None
...
Use xcb's defines instead of Xlib's ones.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
4c2add66d1
Xnest: use XCB_BACK_PIXMAP_* defines
...
Use xcb's defines instead of Xlib's ones.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
e10806b971
xnest: replace ExposureMask by XCB_EVENT_MASK_EXPOSURE
...
Use xcb's defines instead of Xlib's ones.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
03c1122225
Xnest: replace NotUseful by XCB_BACKING_STORE_NOT_USEFUL
...
Use xcb's defines instead of Xlib's ones.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
0436cf2426
Xnest: use XCB_CONFIG_WINDOW_* defines instead of CW*
...
Use xcb's defines instead of Xlib's ones.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
897f761d9b
Xnest: use XCB_CW_* defines instead of CW*
...
Use XCB's defines instead of Xlib's ones.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
a5773bb46d
Xnest: add xcb and x11-xcb as dependency
...
In order to transition to XCB, we need to link xcb, but temporarily
also x11-xcb.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
2025-02-28 19:56:12 +01:00
Enrico Weigelt, metux IT consult
af86c5cbc2
Xnest: use authorative declarations from X11/XKBlib.h
...
Better use the headers from the library we're linking against,
instead of having our own private declarations.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1842 >
2025-02-28 17:27:05 +00:00
Enrico Weigelt, metux IT consult
cab3856903
xfree86: os-support: fix FTBS when no recent enough libdrm found
...
On Linux, the only supported platform bus backend (*1) is via DRM/DRI.
Trying to build it w/o (recent enough) libdrm fails as it tries to
compile the drm-based implementation, w/o having drm.h available. (*2)
In order to fix this, we need to compile noop-implementation instead.
*1) platform specific code for detecting video devices
*2) https://gitlab.freedesktop.org/xorg/xserver/-/issues/1771
Issue: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1771
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1848 >
2025-02-28 16:15:32 +00:00
Enrico Weigelt, metux IT consult
e2ac461629
xfree86: platform_noop: add missing functions
...
In order to be able to build on Linux w/ platform_noop
(when no recent enough libdrm found), a few more dummy functions
are needed here.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1848 >
2025-02-28 16:15:32 +00:00
Enrico Weigelt, metux IT consult
fe9c911e22
xfree86: xf86helper: fix NULL dereference
...
xf86MatchDevice() can segfault if screensecptr->device is NULL.
Issue: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1767
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1847 >
2025-02-28 16:41:09 +01:00
Enrico Weigelt, metux IT consult
628e94b164
os: let vpnprintf() accept %X
...
Several pieces of the code, as well as drivers are using %X, which
we don't support, so leading to error messages like this:
[2025-02-27 14:28:44] BUG: 'if (f[f_idx])'
[2025-02-27 14:28:44] BUG: ../xserver/os/log.c:538 in vpnprintf()
[2025-02-27 14:28:44] Unsupported printf directive 'X'
[2025-02-27 14:28:44]
[2025-02-27 14:28:44] Backtrace:
[2025-02-27 14:28:44] unw_get_proc_name failed: no unwind info found [-10]
[2025-02-27 14:28:44] 0: /usr/lib/Xorg (?+0x0) [0x5f4d1261bc47]
[2025-02-27 14:28:44] 1: /usr/lib/Xorg (LogVHdrMessageVerb+0x10f) [0x5f4d1261ca3f]
[2025-02-27 14:28:44] 2: /usr/lib/Xorg (LogHdrMessageVerb+0x85) [0x5f4d1261cae5]
[2025-02-27 14:28:44] 3: /usr/lib/Xorg (xf86VDrvMsgVerb+0x54) [0x5f4d12636604]
[2025-02-27 14:28:44] 4: /usr/lib/Xorg (xf86DrvMsg+0x97) [0x5f4d126367d7]
[2025-02-27 14:28:44] 5: /usr/lib/Xorg (xf86PrintEDID+0x545) [0x5f4d12654315]
[2025-02-27 14:28:44] 6: /usr/lib/Xorg (xf86OutputSetEDID+0x1bd) [0x5f4d12657e0d]
In the longer run, we'll have to decide whether we actually want to
implement the upper-case directive or change all callers to lower-case.
But for now it's better to just accept %X and interpret it as lower-case,
in order to fix those error messages. Whether it's printed as upper or
lower case is more or less an aesthetic matter.
Reported-By: guido iodice <guido.iodice@gmail.com >
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1846 >
2025-02-28 12:51:44 +01:00
Enrico Weigelt, metux IT consult
53876f1ef1
randr: fix RRGetCrtcTransform reply length, part 2
...
Mixed up reply vs request. Obviously, the size substracted from reply
struct's one has to be the one of the generic reply, not generic requst :o
Background: the meaning of the length field isn't entirely intuitive.
a) the size is in 4-byte units, instead of bytes (therefore passing through
bytes_to_int32() call)
b) it's not the total packet size, but only the *extra* payload size, ergo:
how much is the packet longer than a xGenericReply = 8 units = 32 bytes.
(min. packet size is 32 bytes -> length = 0)
In order to prevent those kind of coding errors ever happening again, it might
be a good idea putting that into a generic macro.
Fixes: c6f1b8a735
Fixes: 0ca5aaba50
Issue: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1797
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1845 >
2025-02-27 12:18:20 +00:00
Enrico Weigelt, metux IT consult
fe156104cf
Revert "mi: drop obsolete miInitOverlay()"
...
This reverts commit 12ab2e314b .
Requested by Nvidia - their proprietary driver still needs it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1843 >
2025-02-27 11:53:54 +00:00
Enrico Weigelt, metux IT consult
41a75f01cc
Revert "mi: drop obsolete miOverlayGetPrivateClips()"
...
This reverts commit 2c21824ee9 .
Requested by Nvidia - their proprietary driver still needs it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1843 >
2025-02-27 11:53:54 +00:00
Enrico Weigelt, metux IT consult
ab95b569e1
Revert "mi: drop obsolete miOverlayCollectUnderlayRegions()"
...
This reverts commit a860ce2c9f .
Requested by Nvidia - their proprietary driver still needs it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1843 >
2025-02-27 11:53:54 +00:00
Enrico Weigelt, metux IT consult
4cdc184c13
Revert "mi: drop obsolete miOverlayComputeCompositeClip()"
...
This reverts commit bfb69b7316 .
Requested by Nvidia - their proprietary driver still needs it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1843 >
2025-02-27 11:53:54 +00:00
Enrico Weigelt, metux IT consult
9d88cc5f11
Revert "mi: drop obsolete miOverlayCopyUnderlay()"
...
This reverts commit be6985948d .
Requested by Nvidia - their proprietary driver still needs it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1843 >
2025-02-27 11:53:54 +00:00
Enrico Weigelt, metux IT consult
d4f92a5688
Revert "mi: drop obsolete miOverlaySetRootClip()"
...
This reverts commit 00796cbf8c .
Requested by Nvidia - their proprietary driver still needs it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1843 >
2025-02-27 11:53:54 +00:00
Enrico Weigelt, metux IT consult
0463d7aaaa
Revert "mi: drop now obsolete mioverlay.c"
...
This reverts commit 65b738ed60 .
Requested by Nvidia - their proprietary driver still needs it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1843 >
2025-02-27 11:53:54 +00:00
Enrico Weigelt, metux IT consult
f1d87a38ae
Revert "mi: drop now obsolete mioverlay.h"
...
This reverts commit 6825f89cd2 .
Requested by Nvidia - their proprietary driver still needs it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1843 >
2025-02-27 11:53:54 +00:00
Enrico Weigelt, metux IT consult
0ca5aaba50
randr: fix RRGetCrtcTransform reply length
...
Reply length field missed to add the payload's size.
Fixes: c6f1b8a735
Issue: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1797
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net >
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1844 >
2025-02-26 19:05:41 +01:00