Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
linux/x11: Fix bugs related to unflushed commands (#13844)
Owen Law56e3fc794a36
diff --git a/crates/gpui/src/platform/linux/x11/client.rs b/crates/gpui/src/platform/linux/x11/client.rsindex 27ee1c8ea46..11d2efb43b4 100644--- a/crates/gpui/src/platform/linux/x11/client.rs+++ b/crates/gpui/src/platform/linux/x11/client.rs@@ -1072,7 +1072,9 @@ impl LinuxClient for X11Client {..Default::default()},)- .expect("failed to change window cursor");+ .expect("failed to change window cursor")+ .check()+ .unwrap();}fn open_uri(&self, uri: &str) {diff --git a/crates/gpui/src/platform/linux/x11/window.rs b/crates/gpui/src/platform/linux/x11/window.rsindex 6d4dbcf2a17..5ca04d509f6 100644--- a/crates/gpui/src/platform/linux/x11/window.rs+++ b/crates/gpui/src/platform/linux/x11/window.rs@@ -607,6 +607,8 @@ impl X11Window {EventMask::SUBSTRUCTURE_REDIRECT | EventMask::SUBSTRUCTURE_NOTIFY,message,)+ .unwrap()+ .check().unwrap();}@@ -994,6 +996,7 @@ impl PlatformWindow for X11Window {xproto::Time::CURRENT_TIME,).log_err();+ self.0.xcb_connection.flush().unwrap();}fn is_active(&self) -> bool {@@ -1022,6 +1025,7 @@ impl PlatformWindow for X11Window {title.as_bytes(),).unwrap();+ self.0.xcb_connection.flush().unwrap();}fn set_app_id(&mut self, app_id: &str) {@@ -1039,6 +1043,8 @@ impl PlatformWindow for X11Window {xproto::AtomEnum::STRING,&data,)+ .unwrap()+ .check().unwrap();}@@ -1074,6 +1080,8 @@ impl PlatformWindow for X11Window {EventMask::SUBSTRUCTURE_REDIRECT | EventMask::SUBSTRUCTURE_NOTIFY,message,)+ .unwrap()+ .check().unwrap();}@@ -1164,6 +1172,8 @@ impl PlatformWindow for X11Window {EventMask::SUBSTRUCTURE_REDIRECT | EventMask::SUBSTRUCTURE_NOTIFY,message,)+ .unwrap()+ .check().unwrap();}@@ -1226,6 +1236,8 @@ impl PlatformWindow for X11Window {4,bytemuck::cast_slice::<u32, u8>(&insets),)+ .unwrap()+ .check().unwrap();}}@@ -1250,6 +1262,8 @@ impl PlatformWindow for X11Window {5,bytemuck::cast_slice::<u32, u8>(&hints_data),)+ .unwrap()+ .check().unwrap();match decorations {