Enrico Weigelt, metux IT consult
11ca5d65a9
( !1654 ) Xnest: replace XDrawString[8|16]() by xcb_poly_text_[8|16]()
...
Replace XDrawString8() by xcb_poly_text_8(), as well as XDrawString16()
by xcb_poly_text_16(). Some care needs to be taken to prepend the xTextElt
header before sending the request out.
GC operation handlers don't need to care about poly-strings or length
above 254, as this is already handled by their caller, doPolyText().
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
4c4f9ee163
( !1654 ) Xnest: replace XFillRectangles() by xcb_poly_fill_rectangle()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
ba7e5b5107
( !1654 ) Xnest: directly pass ClearArea request to upstream server
...
Instead of going through mi machinery, just pass the ClearArea
request to the upstream window.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
2e0973094c
( !1654 ) Xnest: replace XFillArcs() by xcb_poly_fill_arc()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
0251950826
( !1654 ) Xnest: replace XFillPolygon() by xcb_fill_poly()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
2b7aa9c649
( !1654 ) Xnest: replace XCopyPlane() by xcb_copy_plane()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
b9f04a1908
( !1654 ) Xnest: replace XCopyArea() by xcb_copy_area()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
0ec0c8f8f2
( !1654 ) Xnest: replace XDrawArcs() by xcb_poly_arc()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
24f33a0868
( !1654 ) Xnest: replace XDrawRectangles() by xcb_poly_rectangle()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
4d2b4ea0bd
( !1654 ) Xnest: replace XDrawSegments() by xcb_poly_segment()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
12dbc838c2
( !1654 ) Xnest: replace XDrawLines() by xcb_poly_line()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
cf3760c364
( !1654 ) Xnest: replace XDrawPoints() by xcb_poly_point()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
a882765739
( !1654 ) 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>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
646c1049af
( !1654 ) 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>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
74919a3447
( !1654 ) Xnest: use xcb_put_image() for PutImage requests
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
735873a529
( !1654 ) Xnest: use xcb_put_image() for creating cursors
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
8f72652102
( !1654 ) Xnest: replace XCreatePixmapCursor() by xcb_create_cursor()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
e8785d40c6
( !1654 ) Xnest: replace XConfigureWindow() calls by xcb_configure_window()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
936dd6ce1a
( !1654 ) Xnest: use xcb for creating / destroying pixmaps
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
f5b2cf9026
( !1654 ) Xnest: replace XBell() by xcb_bell()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
735738cf3f
( !1654 ) Xnest: use xcb for (un)mapping windows
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
790c45ee56
( !1654 ) Xnest: replace XCreateWindow() by use xcb_create_window()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
880e202f0c
( !1654 ) Xnest: fetch root visual ID from screen data
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
62fd9ca2e1
( !1654 ) Xnest: fetch keycode min/max from setup data
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
a80423ceae
( !1654 ) Xnest: fetch image metrics from xcb connection setup data
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
7df159f9a4
( !1654 ) Xnest: fetch default screen's root window from screen info
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
78f8232e26
( !1654 ) 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>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
d9430c79b8
( !1654 ) Xnest: fetch default colormap from xcb screen info
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
41fb871d46
( !1654 ) Xnest: fetch root window depth from screen info
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
8923ffc264
( !1654 ) Xnest: fetch display size from xcb setup data
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
5a6c0a9321
( !1654 ) Xnest: fetch BlackPixel and WhitePixel from xcb setup data
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
4c886f43a1
( !1654 ) 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>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
0570b883cf
( !1654 ) 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>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
942c39dd65
( !1654 ) 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>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
74e5b43586
( !1654 ) 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>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
c396e50c66
( !1654 ) 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>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
c366623e6d
( !1654 ) 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>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
eaabb5dadb
( !1654 ) 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>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
860b8a060e
( !1654 ) 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>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
f4780dea79
( !1654 ) 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>
2024-09-13 13:36:27 +02:00
Enrico Weigelt, metux IT consult
bd3c252710
dix: unexport NewCurrentScreen()
...
It's not used by external modules/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/1345 >
2024-09-02 16:43:29 +00:00
Enrico Weigelt, metux IT consult
7ce67a99bc
dix: unexport CreateColormap()
...
Not used by any driver/module, so no need to keep it exported.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581 >
2024-09-01 22:06:49 +00:00
Enrico Weigelt, metux IT consult
646831cda2
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 >
2024-09-01 17:45:13 +00:00
Enrico Weigelt, metux IT consult
12f71ede8a
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 >
2024-09-01 00:48:52 +00:00
Enrico Weigelt, metux IT consult
0d3ae98661
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 >
2024-09-01 00:38:30 +00:00
Enrico Weigelt, metux IT consult
3597323d48
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 >
2024-09-01 00:38:30 +00:00
Enrico Weigelt, metux IT consult
e1c47ad123
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 >
2024-08-31 23:45:26 +00:00
Enrico Weigelt, metux IT consult
ea042cd6ef
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 >
2024-08-31 23:32:54 +00:00
Enrico Weigelt, metux IT consult
4db1da86fc
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 >
2024-08-31 23:21:21 +00:00
Enrico Weigelt, metux IT consult
eafd687c47
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 >
2024-08-31 23:09:30 +00:00