feat(wm): toggle monocle off on monitor container moves

This commit ensures that if a user sends one of the various messages
which ultimately call move_container_to_monitor, if the target workspace
on the target monitor currently has a monocle container, it will be
toggled off to allow space for the container being moved to be rendered.
This commit is contained in:
LGUG2Z
2025-05-07 08:19:19 -07:00
parent 09137af305
commit 4ea835fa59

View File

@@ -1923,6 +1923,18 @@ impl WindowManager {
.focused_workspace_mut()
.ok_or_else(|| anyhow!("there is no focused workspace on target monitor"))?;
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()?;
}
if let Some(window) = floating_window {
target_workspace.floating_windows_mut().push_back(window);
target_workspace.set_layer(WorkspaceLayer::Floating);