diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-17 14:07:51 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-17 14:07:51 +0400 |
| commit | dd7362913ec98b1d9a8b5a133044f00324ad5dc7 (patch) | |
| tree | 4951c7abcb0a35c85cf7812e2d7b8d73e01514c7 /src/input.rs | |
| parent | 62892d636112230dc16778b91331fbe97576b005 (diff) | |
| download | niri-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.rs | 10 |
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 { .. } |
