Linux: Fix x11 crash (#7805)

Release Notes:

- N/A
This commit is contained in:
Roman 2024-02-15 03:03:03 +03:00 committed by GitHub
parent f62baeda64
commit 41372a96ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -115,7 +115,9 @@ impl LinuxPlatform {
callbacks: Mutex<Callbacks>,
state: Mutex<LinuxPlatformState>,
) -> Self {
let (xcb_connection, x_root_index) = xcb::Connection::connect(None).unwrap();
let (xcb_connection, x_root_index) =
xcb::Connection::connect_with_extensions(None, &[xcb::Extension::Present], &[])
.unwrap();
let atoms = XcbAtoms::intern_all(&xcb_connection).unwrap();
let xcb_connection = Arc::new(xcb_connection);
let client_dispatcher: Arc<dyn ClientDispatcher + Send + Sync> =