Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Linux: Fix x11 crash (#7805)

Roman41372a96ed9b
diff --git a/crates/gpui/src/platform/linux/platform.rs b/crates/gpui/src/platform/linux/platform.rs
index fb8e36c6ff6..3da95555d74 100644
--- a/crates/gpui/src/platform/linux/platform.rs
+++ b/crates/gpui/src/platform/linux/platform.rs
@@ -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> =