Skip to content

Commit

Permalink
Use XSetEventQueueOwner to indicate XCB
Browse files Browse the repository at this point in the history
I don't know what this actually does, but it can't hurt, right?

Signed-off-by: John Nunley <[email protected]>
  • Loading branch information
notgull committed Sep 30, 2023
1 parent 6c6ff74 commit f1c096a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/platform_impl/linux/x11/xdisplay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit f1c096a

Please sign in to comment.