diff options
author | Alexander Larsson <alexl@redhat.com> | 2013-02-05 09:36:49 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-02-07 11:11:37 +0100 |
commit | 3d4cd4db3ed9f6c47566a69d745441e2662ac2ab (patch) | |
tree | ea187ad53de4aa570e53449b674507022d47d1ee /gtk/gtktoolbar.c | |
parent | 4d3c77f9200dbdfa71e2aaa390d11e88099b5c6e (diff) | |
download | gtk+-3d4cd4db3ed9f6c47566a69d745441e2662ac2ab.tar.gz |
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
Diffstat (limited to 'gtk/gtktoolbar.c')
-rw-r--r-- | gtk/gtktoolbar.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |