From 6f1d6dbdc7a3ed2b52f13c2cb3dae635be66c272 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Thu, 15 May 2025 08:09:08 -0700 Subject: [PATCH] fix(wm): disallow toggle-float if ws has a monocle container This commit ensures that the user can't get into a weird state by attempting to float a monocle container. If a user attempts to call toggle-float on a monocle container, a warning will be logged and the command will be ignored. --- komorebi/src/window_manager.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/komorebi/src/window_manager.rs b/komorebi/src/window_manager.rs index 108cf627..5768c890 100644 --- a/komorebi/src/window_manager.rs +++ b/komorebi/src/window_manager.rs @@ -3131,6 +3131,10 @@ impl WindowManager { pub fn toggle_float(&mut self, force_float: bool) -> Result<()> { let hwnd = WindowsApi::foreground_window()?; let workspace = self.focused_workspace_mut()?; + if workspace.monocle_container().is_some() { + tracing::warn!("ignoring toggle-float command while workspace has a monocle container"); + return Ok(()); + } let mut is_floating_window = false;