From dd7362913ec98b1d9a8b5a133044f00324ad5dc7 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sat, 17 Feb 2024 14:07:51 +0400 Subject: Ignore mouse releases for dismissing overlays --- src/input.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/input.rs b/src/input.rs index 080ed03d..feacceb9 100644 --- a/src/input.rs +++ b/src/input.rs @@ -1495,9 +1495,9 @@ fn bound_action( fn should_activate_monitors(event: &InputEvent) -> bool { match event { InputEvent::Keyboard { event } if event.state() == KeyState::Pressed => true, + InputEvent::PointerButton { event } if event.state() == ButtonState::Pressed => true, InputEvent::PointerMotion { .. } | InputEvent::PointerMotionAbsolute { .. } - | InputEvent::PointerButton { .. } | InputEvent::PointerAxis { .. } | InputEvent::GestureSwipeBegin { .. } | InputEvent::GesturePinchBegin { .. } @@ -1516,8 +1516,8 @@ fn should_activate_monitors(event: &InputEvent) -> bool { fn should_hide_hotkey_overlay(event: &InputEvent) -> bool { match event { InputEvent::Keyboard { event } if event.state() == KeyState::Pressed => true, - InputEvent::PointerButton { .. } - | InputEvent::PointerAxis { .. } + InputEvent::PointerButton { event } if event.state() == ButtonState::Pressed => true, + InputEvent::PointerAxis { .. } | InputEvent::GestureSwipeBegin { .. } | InputEvent::GesturePinchBegin { .. } | InputEvent::TouchDown { .. } @@ -1531,8 +1531,8 @@ fn should_hide_hotkey_overlay(event: &InputEvent) -> bool { fn should_hide_exit_confirm_dialog(event: &InputEvent) -> bool { match event { InputEvent::Keyboard { event } if event.state() == KeyState::Pressed => true, - InputEvent::PointerButton { .. } - | InputEvent::PointerAxis { .. } + InputEvent::PointerButton { event } if event.state() == ButtonState::Pressed => true, + InputEvent::PointerAxis { .. } | InputEvent::GestureSwipeBegin { .. } | InputEvent::GesturePinchBegin { .. } | InputEvent::TouchDown { .. } -- cgit