GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.
fix: cursor jump to correct target monitor (#744)
lars-bergera368285209c0
diff --git a/packages/wm/src/common/commands/platform_sync.rs b/packages/wm/src/common/commands/platform_sync.rsindex dceb2f70..d56f0a77 100644--- a/packages/wm/src/common/commands/platform_sync.rs+++ b/packages/wm/src/common/commands/platform_sync.rs@@ -149,9 +149,10 @@ fn jump_cursor(let cursor_monitor =state.monitor_at_position(&Platform::mouse_position()?);+ // Jump to the target monitor if the cursor is not already on it.cursor_monitor.filter(|monitor| monitor.id() != target_monitor.id())- .map(Into::into)+ .map(|_| target_monitor.into())}};diff --git a/packages/wm/src/common/vec_deque_ext.rs b/packages/wm/src/common/vec_deque_ext.rsindex cc370d26..ddb82f5f 100644--- a/packages/wm/src/common/vec_deque_ext.rs+++ b/packages/wm/src/common/vec_deque_ext.rs@@ -8,10 +8,6 @@ where////// Inserts at index if value doesn't already exist in the `VecDeque`.fn shift_to_index(&mut self, target_index: usize, item: T);-- /// Replaces the first occurrence of a value with a new value in a- /// `VecDeque`.- fn replace(&mut self, old_value: &T, new_value: T);}impl<T> VecDequeExt<T> for VecDeque<T>@@ -27,10 +23,4 @@ whereself.insert(target_index.clamp(0, self.len()), value);}}-- fn replace(&mut self, old_value: &T, new_value: T) {- if let Some(index) = self.iter().position(|e| e == old_value) {- self[index] = new_value;- }- }}