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