Skip to content

Commit

Permalink
fix(wm): restore monocle border on ws change
Browse files Browse the repository at this point in the history
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
  • Loading branch information
LGUG2Z committed Aug 27, 2022
1 parent 5d094f6 commit 26a18ad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions komorebi/src/process_event.rs
Expand Up @@ -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
Expand Down

0 comments on commit 26a18ad

Please sign in to comment.