From 09137af305f28895c5bb213c66fefa74aa8b23b5 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Tue, 6 May 2025 08:24:10 -0700 Subject: [PATCH] feat(wm): toggle monocle off on ws container moves This commit ensures that if a user sends one of the various messages which ultimately call move_container_to_workspace, if the target workspace currently has a monocle container, it will be toggled off to allow space for the container being moved to be rendered. --- komorebi/src/monitor.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/komorebi/src/monitor.rs b/komorebi/src/monitor.rs index 6a11cd68..57e69fd4 100644 --- a/komorebi/src/monitor.rs +++ b/komorebi/src/monitor.rs @@ -458,6 +458,18 @@ impl Monitor { Some(workspace) => workspace, }; + if target_workspace.monocle_container().is_some() { + for container in target_workspace.containers_mut() { + container.restore(); + } + + for window in target_workspace.floating_windows_mut() { + window.restore(); + } + + target_workspace.reintegrate_monocle_container()?; + } + target_workspace.set_layer(WorkspaceLayer::Tiling); if let Some(direction) = direction {