Merge branch '6520_dont_drag_hidden_paned_handle' into 'main'

paned: don't claim drag-begin on invisible handle

Closes #6520

See merge request GNOME/gtk!7016
This commit is contained in:
Matthias Clasen 2024-03-12 15:46:53 +00:00
commit 7ea7d5c390

View File

@ -886,6 +886,14 @@ gesture_drag_begin_cb (GtkGestureDrag *gesture,
GdkDevice *device;
gboolean is_touch;
/* Only drag the handle when it's visible */
if (!gtk_widget_get_child_visible (paned->handle_widget))
{
gtk_gesture_set_state (GTK_GESTURE (gesture),
GTK_EVENT_SEQUENCE_DENIED);
return;
}
sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
device = gdk_event_get_device (event);