[libdazzle] suggestion: protect against unexpected signal delivery



commit 27e5f40f3168b50a5319db7c2e73aa13993e28bb
Author: Christian Hergert <chergert redhat com>
Date:   Wed Aug 15 14:33:52 2018 -0700

    suggestion: protect against unexpected signal delivery
    
    We don't want to deal with this race while simply force drawing
    the revealer at it's full expanded state.

 src/suggestions/dzl-suggestion-popover.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/suggestions/dzl-suggestion-popover.c b/src/suggestions/dzl-suggestion-popover.c
index 81a5c78..f300c65 100644
--- a/src/suggestions/dzl-suggestion-popover.c
+++ b/src/suggestions/dzl-suggestion-popover.c
@@ -797,9 +797,15 @@ dzl_suggestion_popover_items_changed (DzlSuggestionPopover *self,
       !gtk_revealer_get_child_revealed (self->revealer) &&
       (removed || added))
     {
+      g_signal_handlers_block_by_func (self->revealer,
+                                       G_CALLBACK (dzl_suggestion_popover_notify_child_revealed),
+                                       self);
       gtk_revealer_set_transition_duration (self->revealer, 0);
       gtk_revealer_set_reveal_child (self->revealer, FALSE);
       gtk_revealer_set_reveal_child (self->revealer, TRUE);
+      g_signal_handlers_unblock_by_func (self->revealer,
+                                         G_CALLBACK (dzl_suggestion_popover_notify_child_revealed),
+                                         self);
     }
 }
 


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