gestures: Make claiming button release work
When claiming a sequence in a gesture signal handler, the expected result is that GtkGesture::handle-event returns TRUE, causing the event to not be propagated further.
This doesn't work for button release events, since gtk_gesture_handle_event does the following: add point emit ::update remove point check claimed status The ::update signal is where the application code claims the sequence. But removing the point purges the sequence from the gestures memory, so checking the claimed status returns FALSE.
This patch fixes things to behave as expected, by checking the claimed status before removing the point.
See https://discourse.gnome.org/t/how-to-claim-right-click-gestures-released-event-in-gtk4/4194/3 for a testcase