From aed59b3ea9a3a145752fa2d07281b2b23528c0ce Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Mon, 8 Oct 2007 12:39:02 +0000 Subject: [PATCH] Fix #482841, patch by Karl Tomlinson. 2007-10-08 Kristian Rietveld Fix #482841, patch by Karl Tomlinson. * gtk/gtktooltip.c (gtk_tooltip_display_closed): use g_object_set_data instead of g_object_set ... (_gtk_tooltip_toggle_keyboard_mode), (_gtk_tooltip_handle_event): connect to GdkDisplay::closed after creating tooltip. svn path=/trunk/; revision=18890 --- ChangeLog | 10 ++++++++++ gtk/gtktooltip.c | 8 +++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bd32f8dcb8..915323ceb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-10-08 Kristian Rietveld + + Fix #482841, patch by Karl Tomlinson. + + * gtk/gtktooltip.c (gtk_tooltip_display_closed): use g_object_set_data + instead of g_object_set ... + (_gtk_tooltip_toggle_keyboard_mode), + (_gtk_tooltip_handle_event): connect to GdkDisplay::closed after + creating tooltip. + 2007-10-07 Matthias Clasen * configure.in: Don't hardcode use of echo -n. (#484008) diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c index 8e17ce2f7a..56a944d00d 100644 --- a/gtk/gtktooltip.c +++ b/gtk/gtktooltip.c @@ -704,7 +704,7 @@ gtk_tooltip_display_closed (GdkDisplay *display, gboolean was_error, GtkTooltip *tooltip) { - g_object_set (display, "gdk-display-current-tooltip", NULL); + g_object_set_data (G_OBJECT (display), "gdk-display-current-tooltip", NULL); } static gboolean @@ -1090,6 +1090,9 @@ _gtk_tooltip_toggle_keyboard_mode (GtkWidget *widget) g_object_set_data_full (G_OBJECT (display), "gdk-display-current-tooltip", tooltip, g_object_unref); + g_signal_connect (display, "closed", + G_CALLBACK (gtk_tooltip_display_closed), + tooltip); } tooltip->keyboard_mode_enabled ^= 1; @@ -1264,6 +1267,9 @@ _gtk_tooltip_handle_event (GdkEvent *event) g_object_set_data_full (G_OBJECT (display), "gdk-display-current-tooltip", current_tooltip, g_object_unref); + g_signal_connect (display, "closed", + G_CALLBACK (gtk_tooltip_display_closed), + current_tooltip); current_tooltip->last_window = event->any.window; gdk_event_get_root_coords (event,