listbase: Don't start rubberband on ::drag-end
authorAntónio Fernandes <antoniojpfernandes@gmail.com>
Sat, 4 Jun 2022 17:30:10 +0000 (17:30 +0000)
committerAntónio Fernandes <antoniojpfernandes@gmail.com>
Sat, 4 Jun 2022 17:30:10 +0000 (17:30 +0000)
commitdc4540fae98d4f707ce1030b0f8d161c987646e0
tree8d2a34717d7d043fd7ba82a0693eec9f63df210c
parent31da5f7e2a1ff51a05a8d87c704a0cef541edc1f
listbase: Don't start rubberband on ::drag-end

GtkGestrureDrag::drag-end can be emitted when the pointer has just
crossed the drag threshold and we have not started the rubberband yet.
This happens if another gesture has claimed the event sequence earlier
in the current event propagation chain.

In such situation, our ::drag-end calls gtk_list_base_drag_update(),
which proceeds to start the rubberband. That's obviously wrong.
Additionally, it also tries to get modifiers from an event it we are
already denied,  which obviously fails with criticals:

`gdk_event_get_modifier_state: assertion 'GDK_IS_EVENT (event)' failed`

Thus, if there is no rubberband when we receive ::drag-end, do nothing.
gtk/gtklistbase.c