fix(wm): update origin ws after container removal

This commit ensures that the origin workspace will be updated after a
container is removed to be sent to a target workspace (specified, or
currently focused) on another monitor.

With this change in place, moving window containers to another monitor
should not result in a ghost container that remains until the next
retile on the origin workspace.

fix #132
This commit is contained in:
LGUG2Z
2022-04-19 11:10:18 -07:00
parent 686d013734
commit e1c36c9190

View File

@@ -815,6 +815,8 @@ impl WindowManager {
.remove_focused_container()
.ok_or_else(|| anyhow!("there is no container"))?;
monitor.update_focused_workspace(offset, &invisible_borders)?;
let target_monitor = self
.monitors_mut()
.get_mut(monitor_idx)
@@ -845,6 +847,7 @@ impl WindowManager {
self.update_focused_workspace(mouse_follows_focus)
}
pub fn remove_focused_workspace(&mut self) -> Option<Workspace> {
let focused_monitor: &mut Monitor = self.focused_monitor_mut()?;
let focused_workspace_idx = focused_monitor.focused_workspace_idx();