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



commit 3dc3552d54e497835f65cfcf065092d8224eeb29
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 243d68c..33256cb 100644
--- a/src/suggestions/dzl-suggestion-popover.c
+++ b/src/suggestions/dzl-suggestion-popover.c
@@ -823,7 +823,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)
@@ -964,8 +965,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]