Ticket #4381: threads.patch

File threads.patch, 1.4 KB (added by erikos, 10 years ago)

patch to replace g_timeout_add_seconds calls with gdk_threads_add_timeout ones for gtk text selection

  • gtk/gtkentry.c

    From 3e62bf1c7595362c7267c74f5dd9f9563932f0be Mon Sep 17 00:00:00 2001
    From: Carlos Garnacho <carlos@lanedo.com>
    Date: Tue, 15 Jan 2013 16:00:41 +0100
    Subject: [PATCH] use gdk_threads_add_*
    
    ---
     gtk/gtkentry.c    | 4 ++--
     gtk/gtktextview.c | 4 ++--
     2 files changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
    index 0ab12c6..3cad0e0 100644
    a b gtk_entry_selection_bubble_popup_set (GtkEntry *entry) 
    93609360    g_source_remove (priv->selection_bubble_timeout_id);
    93619361
    93629362  priv->selection_bubble_timeout_id =
    9363     g_timeout_add_seconds (1, gtk_entry_selection_bubble_popup_cb,
    9364                            entry);
     9363    gdk_threads_add_timeout (500, gtk_entry_selection_bubble_popup_cb,
     9364                             entry);
    93659365}
    93669366
    93679367static void
  • gtk/gtktextview.c

    diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
    index 7bf542c..dc3b0c1 100644
    a b gtk_text_view_selection_bubble_popup_set (GtkTextView *text_view) 
    88098809    g_source_remove (priv->selection_bubble_timeout_id);
    88108810
    88118811  priv->selection_bubble_timeout_id =
    8812     g_timeout_add_seconds (1, gtk_text_view_selection_bubble_popup_cb,
    8813                            text_view);
     8812    gdk_threads_add_timeout (500, gtk_text_view_selection_bubble_popup_cb,
     8813                             text_view);
    88148814}
    88158815
    88168816/* Child GdkWindows */