mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-17 02:21:20 +02:00
feat(wm): selectively handle uncloak events
This commit adds selective handling for WindowManagerEvent::Uncloak alongside Show and Manage, avoiding the workspace-switching logic that is known to cause infinite workspace loops.
This commit is contained in:
@@ -284,7 +284,10 @@ impl WindowManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WindowManagerEvent::Show(_, window) | WindowManagerEvent::Manage(window) => {
|
WindowManagerEvent::Show(_, window)
|
||||||
|
| WindowManagerEvent::Manage(window)
|
||||||
|
| WindowManagerEvent::Uncloak(_, window) => {
|
||||||
|
if !matches!(event, WindowManagerEvent::Uncloak(_, _)) {
|
||||||
let mut switch_to = None;
|
let mut switch_to = None;
|
||||||
for (i, monitors) in self.monitors().iter().enumerate() {
|
for (i, monitors) in self.monitors().iter().enumerate() {
|
||||||
for (j, workspace) in monitors.workspaces().iter().enumerate() {
|
for (j, workspace) in monitors.workspaces().iter().enumerate() {
|
||||||
@@ -307,6 +310,7 @@ impl WindowManager {
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// There are some applications such as Firefox where, if they are focused when a
|
// There are some applications such as Firefox where, if they are focused when a
|
||||||
// workspace switch takes place, it will fire an additional Show event, which will
|
// workspace switch takes place, it will fire an additional Show event, which will
|
||||||
@@ -583,8 +587,7 @@ impl WindowManager {
|
|||||||
}
|
}
|
||||||
WindowManagerEvent::DisplayChange(..)
|
WindowManagerEvent::DisplayChange(..)
|
||||||
| WindowManagerEvent::MouseCapture(..)
|
| WindowManagerEvent::MouseCapture(..)
|
||||||
| WindowManagerEvent::Cloak(..)
|
| WindowManagerEvent::Cloak(..) => {}
|
||||||
| WindowManagerEvent::Uncloak(..) => {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if !self.focused_workspace()?.tile() {
|
if !self.focused_workspace()?.tile() {
|
||||||
|
|||||||
Reference in New Issue
Block a user