From 862a9512b596a015c01b712409934b2e0721192a Mon Sep 17 00:00:00 2001 From: Christian Bergschneider Date: Fri, 9 Feb 2024 19:15:00 +0100 Subject: [PATCH] gpui: Activate window on Linux (#7617) Release Notes: - N/A Hello everyone, it's me again! This is another todo!(linux) thing in gpui. Best Regards, Christian Bergschneider --- crates/gpui/src/platform/linux/window.rs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/crates/gpui/src/platform/linux/window.rs b/crates/gpui/src/platform/linux/window.rs index 29904d8dfb..a9c00cc7fc 100644 --- a/crates/gpui/src/platform/linux/window.rs +++ b/crates/gpui/src/platform/linux/window.rs @@ -17,7 +17,10 @@ use std::{ rc::Rc, sync::{self, Arc}, }; -use xcb::{x, Xid as _}; +use xcb::{ + x::{self, StackMode}, + Xid as _, +}; #[derive(Default)] struct Callbacks { @@ -337,8 +340,12 @@ impl PlatformWindow for LinuxWindow { unimplemented!() } - //todo!(linux) - fn activate(&self) {} + fn activate(&self) { + self.0.xcb_connection.send_request(&x::ConfigureWindow { + window: self.0.x_window, + value_list: &[x::ConfigWindow::StackMode(StackMode::Above)], + }); + } fn set_title(&mut self, title: &str) { self.0.xcb_connection.send_request(&x::ChangeProperty {