fix(wm): restore monocle border on ws change

This commit ensures that when navigating away from and then back to a
workspace with a monocle window container, that the monocle window
container will be properly focused when navigating back, including
having the focus of the active window border.

fix #219
This commit is contained in:
LGUG2Z
2022-08-27 15:00:20 -07:00
parent 5d094f601f
commit 26a18adeb4

View File

@@ -503,6 +503,12 @@ impl WindowManager {
WindowsApi::raise_window(border.hwnd())?;
};
if let Some(monocle_container) = self.focused_workspace()?.monocle_container() {
if let Some(window) = monocle_container.focused_window() {
target_window = Option::from(*window);
}
}
if target_window.is_none() {
match self.focused_container() {
// if there is no focused container, the desktop is empty