aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-12-14 17:42:52 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-12-30 20:12:37 +0300
commitbd1fd8383c2cc4884cef194bf3ab3b239ec8f167 (patch)
treee920f0fa679b4ac655a5836ef44e9f7512d96be4
parentaac54d0ea1a5c95aba698aed583ee3fa9670f18b (diff)
downloadniri-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.rs4
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);
}
}