mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-19 15:18:40 +01:00
fix(wm): don't duplicate windows on empty workspaces
This commit fixes a subtle boolean logic bug that I think was introduced by a "cargo clippy --fix" to apply some new boolean chaining stuff in Rust 2024. Gotta be more careful.
This commit is contained in:
1 parent
7aea35dff1
commit
9b9c96a89d
1 file changed
+2
-6
@@ -405,12 +405,8 @@ impl WindowManager {
|
||||
}
|
||||
|
||||
if let Some((m_idx, w_idx)) = self.known_window_ids.get(&window_id)
|
||||
&& let Some(focused_workspace_idx) = self
|
||||
.monitors()
|
||||
.get(*m_idx)
|
||||
.map(|m| m.focused_workspace_idx())
|
||||
&& *m_idx != self.focused_monitor_idx()
|
||||
&& *w_idx != focused_workspace_idx
|
||||
&& let Ok(focused_workspace_idx) = self.focused_workspace_idx()
|
||||
&& (*m_idx != self.focused_monitor_idx() || *w_idx != focused_workspace_idx)
|
||||
{
|
||||
tracing::debug!(
|
||||
"ignoring show event for window already associated with another workspace"
|
||||
|
||||
Reference in new issue
Block a user