mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-28 20:21:57 +01:00
fix(wm): give focus priority to monocle containers
This commit ensures that monocle containers are given priority when handling WindowManagerEvent::FocusChange. This is especially important when switching workspaces to ensure that the keyboard input focus stays with the monocle container's focused window when returning to a workspace with a monocle container activated. fix #219
This commit is contained in:
@@ -198,8 +198,14 @@ impl WindowManager {
|
||||
}
|
||||
}
|
||||
|
||||
self.focused_workspace_mut()?
|
||||
.focus_container_by_window(window.hwnd)?;
|
||||
if let Some(monocle) = workspace.monocle_container() {
|
||||
if let Some(window) = monocle.focused_window() {
|
||||
window.focus(false)?;
|
||||
}
|
||||
} else {
|
||||
self.focused_workspace_mut()?
|
||||
.focus_container_by_window(window.hwnd)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
WindowManagerEvent::Show(_, window) | WindowManagerEvent::Manage(window) => {
|
||||
|
||||
Reference in New Issue
Block a user