aboutsummaryrefslogtreecommitdiff
path: root/src/input.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-02-17 14:07:51 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-02-17 14:07:51 +0400
commitdd7362913ec98b1d9a8b5a133044f00324ad5dc7 (patch)
tree4951c7abcb0a35c85cf7812e2d7b8d73e01514c7 /src/input.rs
parent62892d636112230dc16778b91331fbe97576b005 (diff)
downloadniri-dd7362913ec98b1d9a8b5a133044f00324ad5dc7.tar.gz
niri-dd7362913ec98b1d9a8b5a133044f00324ad5dc7.tar.bz2
niri-dd7362913ec98b1d9a8b5a133044f00324ad5dc7.zip
Ignore mouse releases for dismissing overlays
Diffstat (limited to 'src/input.rs')
-rw-r--r--src/input.rs10
1 files 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<I: InputBackend>(event: &InputEvent<I>) -> 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<I: InputBackend>(event: &InputEvent<I>) -> bool {
fn should_hide_hotkey_overlay<I: InputBackend>(event: &InputEvent<I>) -> 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<I: InputBackend>(event: &InputEvent<I>) -> bool {
fn should_hide_exit_confirm_dialog<I: InputBackend>(event: &InputEvent<I>) -> 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 { .. }