Use XSetEventQueueOwner to indicate XCB

I don't know what this actually does, but it can't hurt, right?

Signed-off-by: John Nunley <dev@notgull.net>
This commit is contained in:
John Nunley
2023-09-29 20:19:18 -07:00
parent 9477514ad5
commit 39b5437951

View File

@@ -91,6 +91,14 @@ impl XConnection {
conn.map_err(|e| XNotSupported::XcbConversionError(Arc::new(WrapConnectError(e))))?
};
// Make sure Xlib knows XCB is handling events.
unsafe {
(xlib_xcb.XSetEventQueueOwner)(
display,
x11_dl::xlib_xcb::XEventQueueOwner::XCBOwnsEventQueue,
);
}
// Get the default screen.
let default_screen = unsafe { (xlib.XDefaultScreen)(display) } as usize;