From 107f4a7ff9953f9430fc3f6bf983e88632f7185f Mon Sep 17 00:00:00 2001 From: Ottatop Date: Thu, 21 Mar 2024 17:08:13 -0500 Subject: [PATCH] Layout on client unfullscreen request --- src/handlers/xdg_shell.rs | 4 ++++ src/handlers/xwayland.rs | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/handlers/xdg_shell.rs b/src/handlers/xdg_shell.rs index 1f30560..beb8c83 100644 --- a/src/handlers/xdg_shell.rs +++ b/src/handlers/xdg_shell.rs @@ -721,6 +721,7 @@ impl XdgShellHandler for State { if !window.with_state(|state| state.fullscreen_or_maximized.is_fullscreen()) { window.toggle_fullscreen(); + self.request_layout(&output); } } @@ -751,6 +752,9 @@ impl XdgShellHandler for State { if window.with_state(|state| state.fullscreen_or_maximized.is_fullscreen()) { window.toggle_fullscreen(); + if let Some(output) = window.output(self) { + self.request_layout(&output); + } } } diff --git a/src/handlers/xwayland.rs b/src/handlers/xwayland.rs index cec2ad0..7e6bde2 100644 --- a/src/handlers/xwayland.rs +++ b/src/handlers/xwayland.rs @@ -341,6 +341,9 @@ impl XwmHandler for State { if !window.with_state(|state| state.fullscreen_or_maximized.is_fullscreen()) { window.toggle_fullscreen(); + if let Some(output) = window.output(self) { + self.request_layout(&output); + } } } @@ -358,6 +361,9 @@ impl XwmHandler for State { if window.with_state(|state| state.fullscreen_or_maximized.is_fullscreen()) { window.toggle_fullscreen(); + if let Some(output) = window.output(self) { + self.request_layout(&output); + } } }