[libdazzle] suggestions: do not allow movements when unmapped



commit a07530c40882da1eded5ec8c5ed5865fa8224454
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jan 28 18:09:56 2019 -0800

    suggestions: do not allow movements when unmapped

 src/suggestions/dzl-suggestion-entry.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/suggestions/dzl-suggestion-entry.c b/src/suggestions/dzl-suggestion-entry.c
index fa268fa..61c01fc 100644
--- a/src/suggestions/dzl-suggestion-entry.c
+++ b/src/suggestions/dzl-suggestion-entry.c
@@ -352,10 +352,11 @@ dzl_suggestion_entry_move_suggestion (DzlSuggestionEntry *self,
 
   g_assert (DZL_IS_SUGGESTION_ENTRY (self));
 
-  priv->in_move_by++;
+  if (priv->popover == NULL || !gtk_widget_get_mapped (GTK_WIDGET (priv->popover)))
+    return;
 
+  priv->in_move_by++;
   dzl_suggestion_popover_move_by (priv->popover, amount);
-
   priv->in_move_by--;
 }
 


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