Fix #482841, patch by Karl Tomlinson.

2007-10-08  Kristian Rietveld  <kris@imendio.com>

	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
This commit is contained in:
Kristian Rietveld 2007-10-08 12:39:02 +00:00 committed by Kristian Rietveld
parent 641d5ad4f8
commit aed59b3ea9
2 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,13 @@
2007-10-08 Kristian Rietveld <kris@imendio.com>
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 <mclasen@redhat.com>
* configure.in: Don't hardcode use of echo -n. (#484008)

View File

@ -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,