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.

gpui: Set window title on Linux (#7589)

Christian Bergschneider07891b49787f
diff --git a/crates/gpui/src/platform/linux/window.rs b/crates/gpui/src/platform/linux/window.rs
index e88ebde0297..d396c746282 100644
--- a/crates/gpui/src/platform/linux/window.rs
+++ b/crates/gpui/src/platform/linux/window.rs
@@ -340,8 +340,15 @@ impl PlatformWindow for LinuxWindow {
//todo!(linux)
fn activate(&self) {}
- //todo!(linux)
- fn set_title(&mut self, title: &str) {}
+ fn set_title(&mut self, title: &str) {
+ self.0.xcb_connection.send_request(&x::ChangeProperty {
+ mode: x::PropMode::Replace,
+ window: self.0.x_window,
+ property: x::ATOM_WM_NAME,
+ r#type: x::ATOM_STRING,
+ data: title.as_bytes(),
+ });
+ }
//todo!(linux)
fn set_edited(&mut self, edited: bool) {}