From 3d4cd4db3ed9f6c47566a69d745441e2662ac2ab Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 5 Feb 2013 09:36:49 +0100 Subject: Add gtk_widget_(un)register_window This replaces the previously hardcoded calls to gdk_window_set_user_data, and also lets us track which windows are a part of a widget. Old code should continue working as is, but new features that require the windows may not work perfectly. We need this for the transparent widget support to work, as we need to specially mark the windows of child widgets. https://bugzilla.gnome.org/show_bug.cgi?id=687842 --- gtk/gtktoolbar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gtk/gtktoolbar.c') diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c index 5caeb0d4e2..0ca1b7eea4 100644 --- a/gtk/gtktoolbar.c +++ b/gtk/gtktoolbar.c @@ -844,7 +844,7 @@ gtk_toolbar_realize (GtkWidget *widget) priv->event_window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask); - gdk_window_set_user_data (priv->event_window, toolbar); + gtk_widget_register_window (widget, priv->event_window); } static void @@ -855,7 +855,7 @@ gtk_toolbar_unrealize (GtkWidget *widget) if (priv->event_window) { - gdk_window_set_user_data (priv->event_window, NULL); + gtk_widget_unregister_window (widget, priv->event_window); gdk_window_destroy (priv->event_window); priv->event_window = NULL; } -- cgit v1.2.1