mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-13 12:23:38 +01:00
fix(scrolling): refocus after a window is closed with Hide
Closing a window sends Hide and not Destroy to many applications. The Hide arm re-tiled without asking Windows to focus the surviving window, so no window had the foreground and the border did not follow focus. Use the same refocus rule as the Destroy arm.
This commit is contained in:
1 parent
ae8e982380
commit
e3dd3c60de
1 file changed
+6
-1
@@ -390,7 +390,12 @@ impl WindowManager {
|
||||
|
||||
if hide {
|
||||
self.focused_workspace_mut()?.remove_window(window.hwnd)?;
|
||||
self.update_focused_workspace(false, false)?;
|
||||
|
||||
// Closing a window sends Hide and not Destroy to many applications, so
|
||||
// hand focus on to the surviving window as the Destroy arm does
|
||||
let refocus =
|
||||
should_refocus_after_destroy(WindowsApi::foreground_window().ok());
|
||||
self.update_focused_workspace(refocus, refocus)?;
|
||||
}
|
||||
|
||||
let mut already_moved_window_handles = self.already_moved_window_handles.lock();
|
||||
|
||||
Reference in new issue
Block a user