mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 22:12:53 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user