listbase: Cancel rubberband if not handling drag

If the drag events are claimed by another gesture (e.g. a GtkDragSource in an item widget), list base still commits a rubberband selection, for a rubberband which wasn't even visible yet. This is a problem for the GNOME Files application which needs both rubberbanding and drag-n-drop.

My previous fix[0] was enough for the case where the event sequence is claimed right before the first GtkDragGesture::drag-update emission, but it's useless if the event is claimed later (e.g. after the drag treashold), because a rubberband already exists by that time.

Therefore, the complete solution requres checking whether the event sequence is no longer being handled by our gesture, and commit the selection changes only if it is, but otherwise cleanup the rubberband.

This is what GtkFlowBox does already, so let's do the same here.

[0] commit dc4540fa

Merge request reports