diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-14 17:42:52 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-30 20:12:37 +0300 |
| commit | bd1fd8383c2cc4884cef194bf3ab3b239ec8f167 (patch) | |
| tree | e920f0fa679b4ac655a5836ef44e9f7512d96be4 | |
| parent | aac54d0ea1a5c95aba698aed583ee3fa9670f18b (diff) | |
| download | niri-bd1fd8383c2cc4884cef194bf3ab3b239ec8f167.tar.gz niri-bd1fd8383c2cc4884cef194bf3ab3b239ec8f167.tar.bz2 niri-bd1fd8383c2cc4884cef194bf3ab3b239ec8f167.zip | |
Stop move grab when the start button is released
Rather than when all buttons are released.
| -rw-r--r-- | src/input/move_grab.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input/move_grab.rs b/src/input/move_grab.rs index a11a09cf..c1d979bc 100644 --- a/src/input/move_grab.rs +++ b/src/input/move_grab.rs @@ -123,8 +123,8 @@ impl PointerGrab<State> for MoveGrab { } } - if handle.current_pressed().is_empty() { - // No more buttons are pressed, release the grab. + if !handle.current_pressed().contains(&self.start_data.button) { + // The button that initiated the grab was released. handle.unset_grab(self, data, event.serial, event.time, true); } } |
