[gtk+] textview: Unset bubble timeout ID right after requesting the clipboard



commit 5bc437d2bc2e70f58962407c73839cfe4ae07f68
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Aug 21 17:43:10 2014 +0200

    textview: Unset bubble timeout ID right after requesting the clipboard
    
    The timeout ID used to be unset after we got the targets from the
    clipboard, but there's still a moment between the clipboard request and
    the GDK_SELECTION_NOTIFY event that the ID points to an already gone
    timeout.

 gtk/gtktextview.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 6e283af..59c3819 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -9051,8 +9051,6 @@ bubble_targets_received (GtkClipboard     *clipboard,
 
   gtk_popover_set_pointing_to (GTK_POPOVER (priv->selection_bubble), &rect);
   gtk_widget_show (priv->selection_bubble);
-
-  priv->selection_bubble_timeout_id = 0;
 }
 
 static gboolean
@@ -9064,6 +9062,7 @@ gtk_text_view_selection_bubble_popup_cb (gpointer user_data)
                                  gdk_atom_intern_static_string ("TARGETS"),
                                  bubble_targets_received,
                                  text_view);
+  text_view->priv->selection_bubble_timeout_id = 0;
 
   return G_SOURCE_REMOVE;
 }


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