Skip to content

Commit

Permalink
bugfix(x11): Fix incorrect delta filtering
Browse files Browse the repository at this point in the history
This fixes the incorrect delta filtering. Due to a bug in the filtering
code, it would incorrectly filter out the correct mouse delta rather
than the one below zero. This fixes the order of events.

Signed-off-by: John Nunley <[email protected]>
  • Loading branch information
notgull committed Mar 2, 2024
1 parent 388c40b commit 2ffe11c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform_impl/linux/x11/util/mouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ macro_rules! consume {
let this = $this;
let (x, y) = match (this.x.abs() < <$ty>::EPSILON, this.y.abs() < <$ty>::EPSILON) {
(true, true) => return None,
(true, false) => (this.x, 0.0),
(false, true) => (0.0, this.y),
(false, true) => (this.x, 0.0),
(true, false) => (0.0, this.y),
(false, false) => (this.x, this.y),
};

Expand Down

0 comments on commit 2ffe11c

Please sign in to comment.