forge
Explore
Log in

Don't you dare go Hollow

Stop move grab when the start button is released

Browse files at this commit

bd1fd8383c2cc4884cef194bf3ab3b239ec8f167Ivan MolodetskikhParent: aac54d0
Rather than when all buttons are released.
src/input/move_grab.rsmodified+2 -2
@@ -123,8 +123,8 @@ impl PointerGrab<State> for MoveGrab {
123 }123 }
124 }124 }
125 125
126- if handle.current_pressed().is_empty() {126+ if !handle.current_pressed().contains(&self.start_data.button) {
127- // No more buttons are pressed, release the grab.127+ // The button that initiated the grab was released.
128 handle.unset_grab(self, data, event.serial, event.time, true);128 handle.unset_grab(self, data, event.serial, event.time, true);
129 }129 }
130 }130 }