mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-13 12:23:38 +01:00
fix(wm): ensure focus restore on float + max hwnds
This commit ensures that when switching to a workspace which contains a floating window or a maximized window, either the maximized window or the first floating window index will be focused. This is to prevent windows which have been hidden on the previous workspace from retaining keyboard focus. fix #1130
This commit is contained in:
1 parent
219fa8e14f
commit
d001d8a7a6
1 file changed
+4
@@ -246,6 +246,10 @@ impl Workspace {
|
||||
if let Some(window) = to_focus {
|
||||
if self.maximized_window().is_none() && self.floating_windows().is_empty() {
|
||||
window.focus(mouse_follows_focus)?;
|
||||
} else if let Some(maximized_window) = self.maximized_window() {
|
||||
maximized_window.focus(mouse_follows_focus)?;
|
||||
} else if let Some(floating_window) = self.floating_windows().first() {
|
||||
floating_window.focus(mouse_follows_focus)?;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user