From 6d586c8156c20b3dbf7e10e4dae5e14fd34618a5 Mon Sep 17 00:00:00 2001 From: tcmal Date: Fri, 5 Jul 2024 15:34:03 +0100 Subject: Set dialog windows to floating when first --- src/clients/client.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/clients/client.rs') diff --git a/src/clients/client.rs b/src/clients/client.rs index d4e2e88..6845e4e 100644 --- a/src/clients/client.rs +++ b/src/clients/client.rs @@ -114,7 +114,7 @@ impl Client { /// Set the floating status. pub fn set_floating(&mut self, conn: &Connection<'_>, floating: bool) { - if floating != self.floating { + if floating && floating != self.floating { conn.send_request(&ConfigureWindow { window: self.window, value_list: &[ConfigWindow::StackMode(StackMode::Above)], @@ -177,6 +177,13 @@ impl Client { }) } + pub fn update_window_type(&mut self, conn: &Connection<'_>) { + // TODO: Fullscreen from net_wm_state + if hints::is_dialog(conn, self.window) { + self.set_floating(conn, true); + } + } + pub fn set_urgent(&mut self, urgent: bool) { self.urgent = urgent; } -- cgit v1.2.3