[libadwaita/wip/exalm/tab-fixes: 1/3] tab-box: Fix autoscroll for dragged tab




commit fe1445c716cb7a29928144218a9b98fbe0169b62
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

 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 594f8cd7..828a76bb 100644
--- a/src/adw-tab-box.c
+++ b/src/adw-tab-box.c
@@ -3060,6 +3060,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;
@@ -3186,7 +3187,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]