[libdazzle/libdazzle-3-32] suggestions: handle popup/down transitions more reliably



commit 40cd1649dfba79297aeeb06870ee280b7ab04d48
Author: Christian Hergert <chergert redhat com>
Date:   Tue Oct 15 14:15:28 2019 -0700

    suggestions: handle popup/down transitions more reliably
    
    When we are transitioning from visible to non-visible, we have a number
    of operations in play (animating, then hiding, etc). We need to do more
    than just check for mapped before we short-circuit.
    
    Fixes #49

 src/suggestions/dzl-suggestion-popover.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/suggestions/dzl-suggestion-popover.c b/src/suggestions/dzl-suggestion-popover.c
index b8988c8..304f092 100644
--- a/src/suggestions/dzl-suggestion-popover.c
+++ b/src/suggestions/dzl-suggestion-popover.c
@@ -821,7 +821,8 @@ dzl_suggestion_popover_popup (DzlSuggestionPopover *self)
       return;
     }
 
-  if (gtk_widget_get_mapped (GTK_WIDGET (self)))
+  if (gtk_widget_get_mapped (GTK_WIDGET (self)) &&
+      gtk_revealer_get_reveal_child (self->revealer))
     return;
 
   if (self->relative_to != NULL)
@@ -962,8 +963,10 @@ dzl_suggestion_popover_items_changed (DzlSuggestionPopover *self,
       DZL_EXIT;
     }
 
-  if (gtk_widget_get_mapped (GTK_WIDGET (self)))
-    return;
+  if (gtk_widget_get_mapped (GTK_WIDGET (self)) &&
+      gtk_revealer_get_child_revealed (self->revealer) &&
+      gtk_revealer_get_reveal_child (self->revealer))
+    DZL_EXIT;
 
   /*
    * If we are currently animating in the initial view of the popover,


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