Enrico Weigelt, metux IT consult
164dbbb064
( !1654 ) Xnest: use XCB for event loop
...
Now that no X11 calls are being done via Xlib anymore, we're free to
also move over event receiving, leaving Xlib pretty much unused.
Also need to add a simple event queue mechanism, because we've go a
screen operation (see xnestBitBlitHelper) that needs to collect up
certain events for it's return value.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
4d8ed31988
( !1654 ) Xnest: drop xnestWindowExposures micro-optimization
...
xnestWindowExposures() is a micro-optimization for the specific case that
a newly created window receives exposure events (from our upstream server)
inside the region we're already exposing on our own (miWindowExposures()):
it peeks the Xlib event queue for all expose events, checks whether their
areas are inside our exposure region and requeue's those that aren't.
Unfortunately, this depends on Xlib's internal queue mechamism, thus standing
in the way of moving to XCB (which doesn't have that).
Removing this doens't seem to make any practical difference, even with
demanding applications like GIMP. The only cost is potentially having some
initial window content painted twice, *if* the application really draws
something complicated right after creating the window.
*If* there'll really be a demand for such an optimization some day, it can
be reimplemented without any message queue: just redirecting all expose events
into recording them in a region, which is flushed out later. But for now,
there really doesn't seem to be any practical need for that.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
24e6785080
( !1654 ) Xnest: replace XConnectionNumber() by xcb_get_file_descriptor()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
1220af84cb
( !1654 ) Xnest: replace XReparentWindow() by xcb_reparent_window()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
5ccb9dee42
( !1654 ) Xnest: drop using XLoadQueryFont()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
28796fbe09
( !1654 ) Xnest: replace XTextWidth[16]() by own implementation
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
3d72866048
( !1654 ) Xnest: load fonts via xcb
...
FIXME: support xf86bigfont extension
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
8abde6b0d7
( !1654 ) Xnest: replace XQueryBestSize() by xcb_query_best_size()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
037fe97d55
( !1654 ) Xnest: replace X(Un)InstallColormap() by xcb_(un)install_colormap()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
9ef188c2a0
( !1654 ) Xnest: drop obsolete XGetVisualInfo() call and reundant colormaps
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
3f9c5aa5ec
( !1654 ) Xnest: use new lookup table for visuals and cmaps mappings
...
Use the visuals lookup table introduced by previous commit for
looking up local vs upstream visuals and their colormaps.
Replacing the the old Xlib visuals table.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
bdbd44b1ba
( !1654 ) Xnest: screen: record visuals and cmaps in separate table
...
Record the associations between host's and our visuals as well their
corresponding cmaps in a global table, which's used later for lookups.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
8321676c0e
( !1654 ) Xnest: fetch visuals from XCB setup data instead of Xlib
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
cbd748e78d
( !1654 ) Xnest: screen move assigment between depths and visual assignment to own function
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
da4e2c98fb
( !1654 ) Xnest: replace XParseGeometry() by own implementation
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
2a7fac9add
( !1654 ) Xnest: replace XGetWindowAttributes() by xcb_get_geometry()
...
Use xcb function instead of Xlib, and also spare one additional
(unused) request.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
a73c344758
( !1654 ) Xnest: collect upstream window geometry in one xRectangle struct
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
404f7e9130
( !1654 ) Xnest: replace XGetKeyboardControl() by xcb_get_keyboard_control()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
845f43d7bd
( !1654 ) Xnest: replace XGetPointerMapping() by xcb_get_pointer_mapping()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
1d163fe4d2
( !1654 ) Xnest: replace XGetPointerControl() by xcb_get_pointer_control()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
bbdaab85cd
( !1654 ) Xnest: replace XGetModifierMapping() by xcb_get_modifier_mapping()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
ee1a99b339
( !1654 ) Xnest: fetch keyboard mapping via xcb
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
e0560edc40
( !1654 ) Xnest: add own copy of fixed xcb_xkb_get_kbd_by_name()
...
This is a temporary measure, until xcbproto / libxcb is fixed:
keep an own copy of the fixed xcb_xkb_get_kbd_by_name(), renamed
as xcb_xkb_get_kbd_by_name_1().
Once xcbproto/libxcb is fixed (and new xcb release is out), this
commit can be reverted.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
4b8d5bda9f
( !1654 ) Xnest: use xcb for retrieving keymap controls
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
7843e04d38
( !1654 ) Xnest: replace XSelectInput() by xcb_change_window_attributes()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
fa17ff5c9a
( !1654 ) Xnest: replace XSetStandardProperties() by xcb functions
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
570ccba299
( !1654 ) Xnest: fetch supported pixmap formats from xcb setup data
...
There's even no need to keep our own copies, since we can ask XCB's
copy any time.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
efe0a740c1
( !1654 ) Xnest: fetch allowed screen depths from xcb screen info
...
There's even no need to keep our own copies, since we can ask XCB's
copy any time.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
10f2746278
( !1654 ) Xnest: Pixmap: replace XGetImage() by xcb_get_image()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
cd6cd40686
( !1654 ) Xnest: GC: replace XGetImage() by xcb_get_image()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
745668787d
( !1654 ) Xnest: replace XDestroyWindow() by xnest_destroy_window()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
bc1feee7e2
( !1654 ) Xnest: replace XCreatePixmapFromBitmapData() by xcb_put_image()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
0471eb7255
( !1654 ) Xnest: replace XCreateBitmapFromData() by xcb_put_image()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
a56168cefa
( !1654 ) Xnest: replace XDefineCursor() by xcb_change_window_attributes()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
81d7ba36d2
( !1654 ) Xnest: replace xnestRecolorCursor() by xcb_recolor_cursor()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
e845df4f05
( !1654 ) Xnest: replace XFreeCursor() by xcb_free_cursor()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
fe85ace543
( !1654 ) Xnest: replace XStoreColors() by xcb_store_colors()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
8712e82d7a
( !1654 ) Xnest: replace XQueryColors() by xcb_query_colors()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
a36a912b42
( !1654 ) Xnest: replace XSetWindowColormap() by xcb_change_window_attributes()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
6168f9fc99
( !1654 ) Xnest: replace XSetWMColormapWindows() by xcb_icccm_set_wm_colormap_windows_checked()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
74fa793034
( !1654 ) Xnest: use XIDs directly, instead of Xlib's GC
...
Now that no Xlib drawing functions used anymore, we can finally switch over
to using GC XID's directly, instead of Xlib's GC struct.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
ae808f61a7
( !1654 ) Xnest: GC: set stipple filling via xcb_change_gc
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
16d476f1bb
( !1654 ) Xnest: replace XSetClipMask() by xcb_change_gc()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
e5020512d4
( !1654 ) Xnest: replace XSetClipRectangles() by xnset_set_clip_rectangles()
...
Use XCB for setting clip rectangles.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
1ced95d547
( !1654 ) Xnest: replace XSetDashes() by xnest_set_dashes()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
027822af2e
( !1654 ) Xnest: replace XChangeGC() by xcb_change_gc()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
94a10d2d8d
( !1654 ) Xnest: replace XChangeKeyboardControl() by xcb_change_keyboard_control()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
3fb2da2c4d
( !1654 ) Xnest: replace XChangePointerControl() by xcb_change_pointer_control
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
229462a5a9
( !1654 ) Xnest: replace XChangeWindowAttributes() by xcb_aux_change_window_attributes()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
a579e624d1
( !1654 ) Xnest: replace XDrawImageString() by xcb_image_text_8()
...
Replace XDrawImageString() by xcb_image_text_8(), as well as their 16-bit
counterparts.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
8112fac31e
( !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-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
ea0828847d
( !1654 ) Xnest: replace XFillRectangles() by xcb_poly_fill_rectangle()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
a8a4a68b23
( !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-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
16e9593bfb
( !1654 ) Xnest: replace XFillArcs() by xcb_poly_fill_arc()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
0c1a577309
( !1654 ) Xnest: replace XFillPolygon() by xcb_fill_poly()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
049f933aff
( !1654 ) Xnest: replace XCopyPlane() by xcb_copy_plane()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
12ec3aaf8b
( !1654 ) Xnest: replace XCopyArea() by xcb_copy_area()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
8620d23fb6
( !1654 ) Xnest: replace XDrawArcs() by xcb_poly_arc()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
4a4eaa0a3c
( !1654 ) Xnest: replace XDrawRectangles() by xcb_poly_rectangle()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
54b349065e
( !1654 ) Xnest: replace XDrawSegments() by xcb_poly_segment()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
2c2cb01f18
( !1654 ) Xnest: replace XDrawLines() by xcb_poly_line()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
847623d38b
( !1654 ) Xnest: replace XDrawPoints() by xcb_poly_point()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
a5cf92a9c8
( !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-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
5f68b65259
( !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-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
9d68aaf980
( !1654 ) Xnest: use xcb_put_image() for PutImage requests
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
a38c9e4935
( !1654 ) Xnest: use xcb_put_image() for creating cursors
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
0378fc45fe
( !1654 ) Xnest: replace XCreatePixmapCursor() by xcb_create_cursor()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
5694b4f2e1
( !1654 ) Xnest: replace XConfigureWindow() calls by xcb_configure_window()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
7bce15e99b
( !1654 ) Xnest: use xcb for creating / destroying pixmaps
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
8b92fbb9fe
( !1654 ) Xnest: replace XBell() by xcb_bell()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
a868dd5800
( !1654 ) Xnest: use xcb for (un)mapping windows
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
d4f9cd9a4a
( !1654 ) Xnest: replace XCreateWindow() by use xcb_create_window()
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
42405d0faf
( !1654 ) Xnest: fetch root visual ID from screen data
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
ed847c1107
( !1654 ) Xnest: fetch keycode min/max from setup data
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
4c6a8be7ea
( !1654 ) Xnest: fetch image metrics from xcb connection setup data
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
ace6778660
( !1654 ) Xnest: fetch default screen's root window from screen info
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
1242abc05e
( !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-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
4cab789beb
( !1654 ) Xnest: fetch default colormap from xcb screen info
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
4f40d24a7a
( !1654 ) Xnest: fetch root window depth from screen info
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
83c77d4453
( !1654 ) Xnest: fetch display size from xcb setup data
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
c14ff53a06
( !1654 ) Xnest: fetch BlackPixel and WhitePixel from xcb setup data
...
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
42305363b2
( !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-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
165d9ee9c4
( !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-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
5f73560811
( !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-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
317347490d
( !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-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
da4821bdf3
( !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-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
4b71dd8994
( !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-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
ece3cf4219
( !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-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
d2087e1b1e
( !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-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
8e3025b826
( !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-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
b5294d334f
(submit/xnest-expose-events) 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
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/132
Fixes: 605e6764df
- Fix Motif menu drawing in Xnest
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
4a4fb2817a
(submit/xnest-bool) 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>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
54860920e1
(submit/xnest-fix-missing-guards) Xnest: add guards to Xnest.h
...
protect it from duplicate inclusion.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
b51f17a372
(submit/xnest-XNGC.h-fix-missing-includes) 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>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
1d0c4927f4
(submit/xnest-fix-missing-include-colormap.h) 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>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
dc8734ac44
(submit/xnest-cleanup-event-handler) 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>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
e2fc6519b7
(submit/xnest-cleanup-event-handler) 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>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult
720651ebf3
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 >
2024-08-26 11:33:40 +02:00
Enrico Weigelt, metux IT consult
8d5584558f
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 >
2024-08-26 03:58:28 +00:00
Enrico Weigelt, metux IT consult
f26f17c66a
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 >
2024-08-26 03:44:23 +00:00