From bd1fd8383c2cc4884cef194bf3ab3b239ec8f167 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sat, 14 Dec 2024 17:42:52 +0300 Subject: Stop move grab when the start button is released Rather than when all buttons are released. --- src/input/move_grab.rs | 4 ++-- 1 file 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 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); } } -- cgit