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 Oct 14, 2023
1 parent b6f783a commit 6b9a1a9
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 6b9a1a9

Please sign in to comment.