mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-12 06:20:25 +01:00
Compare commits
2 Commits
master
...
feature/mo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57825db886 | ||
|
|
bdf66cc362 |
@@ -334,8 +334,10 @@ impl WindowManager {
|
||||
if proceed {
|
||||
let behaviour = self.window_container_behaviour;
|
||||
let workspace = self.focused_workspace_mut()?;
|
||||
let workspace_contains_window = workspace.contains_window(window.hwnd);
|
||||
let workspace_has_monocle_container = workspace.monocle_container().is_some();
|
||||
|
||||
if !workspace.contains_window(window.hwnd) && !needs_reconciliation {
|
||||
if !workspace_contains_window && !needs_reconciliation {
|
||||
match behaviour {
|
||||
WindowContainerBehaviour::Create => {
|
||||
workspace.new_container_for_window(window);
|
||||
@@ -350,6 +352,13 @@ impl WindowManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if matches!(event, WindowManagerEvent::Uncloak(_, _)) {
|
||||
if workspace_contains_window && workspace_has_monocle_container {
|
||||
self.toggle_monocle()?;
|
||||
window.focus(self.mouse_follows_focus)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
WindowManagerEvent::MoveResizeStart(_, window) => {
|
||||
|
||||
@@ -1129,7 +1129,11 @@ impl WindowManager {
|
||||
|
||||
tracing::info!("focusing container");
|
||||
|
||||
let new_idx = workspace.new_idx_for_direction(direction);
|
||||
let new_idx = if workspace.monocle_container().is_some() {
|
||||
None
|
||||
} else {
|
||||
workspace.new_idx_for_direction(direction)
|
||||
};
|
||||
|
||||
let mut cross_monitor_monocle = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user