gtknotebook: Claim event sequence after pressing notebook arrow buttons
authorMat <mail@mathias.is>
Sun, 28 Aug 2022 20:34:27 +0000 (23:34 +0300)
committerMat <mail@mathias.is>
Sun, 28 Aug 2022 20:42:59 +0000 (23:42 +0300)
When notebook tabs are reorderable, pressing the notebook arrow buttons to
change the active tab results in tabs reordering unexpectedly.
Claim the event sequence after pressing an arrow button to avoid conflicts
with the motion/drag gesture used for reordering.

gtk/gtknotebook.c

index 62b3c96b267da5faee9a0c16f5a5947a68732977..af8e1cd3452d8fccd3c0e13e37ec4be0f05dbb20 100644 (file)
@@ -2569,6 +2569,7 @@ gtk_notebook_gesture_pressed (GtkGestureClick *gesture,
   if (arrow != ARROW_NONE)
     {
       gtk_notebook_arrow_button_press (notebook, arrow, button);
+      gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
       return;
     }