[libadwaita/libadwaita-1-1] tab-box: Fix autoscroll for dragged tab



commit 4771b69aabb71fa88f1b64b469674b9b4bc4d08a
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Apr 11 18:35:48 2022 +0400

    tab-box: Fix autoscroll for dragged tab
    
    We call adw_animation_pause() in that case and so that check was failing.
    
    Regressed in cefc3ec8cf327c6a9959f1c3ca0929559398e348
    
    
    (cherry picked from commit fe1445c716cb7a29928144218a9b98fbe0169b62)

 src/adw-tab-box.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/adw-tab-box.c b/src/adw-tab-box.c
index 3b9e3c53..1af2cb6d 100644
--- a/src/adw-tab-box.c
+++ b/src/adw-tab-box.c
@@ -2929,6 +2929,7 @@ adw_tab_box_size_allocate (GtkWidget *widget,
                            int        baseline)
 {
   AdwTabBox *self = ADW_TAB_BOX (widget);
+  AdwAnimationState state;
   gboolean is_rtl;
   GList *l;
   GtkAllocation child_allocation;
@@ -3038,7 +3039,8 @@ adw_tab_box_size_allocate (GtkWidget *widget,
     self->scheduled_scroll.info = NULL;
   }
 
-  if (adw_animation_get_state (self->scroll_animation) != ADW_ANIMATION_IDLE) {
+  state = adw_animation_get_state (self->scroll_animation);
+  if (state == ADW_ANIMATION_PLAYING || state == ADW_ANIMATION_FINISHED) {
     self->block_scrolling = TRUE;
     gtk_adjustment_set_value (self->adjustment,
                               get_scroll_animation_value (self));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]