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:
LGUG2Z committed 2025-09-27 17:02:01 -07:00
1 parent 7aea35dff1
commit 9b9c96a89d
1 file changed
+2 -6
+2 -6
View File
@@ -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"