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/gtktoolitem.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/gtktoolitem.c')
-rw-r--r-- | gtk/gtktoolitem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtktoolitem.c b/gtk/gtktoolitem.c index 26ad1402f7..1671753710 100644 --- a/gtk/gtktoolitem.c +++ b/gtk/gtktoolitem.c @@ -432,7 +432,7 @@ create_drag_window (GtkToolItem *toolitem) toolitem->priv->drag_window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask); - gdk_window_set_user_data (toolitem->priv->drag_window, toolitem); + gtk_widget_register_window (widget, toolitem->priv->drag_window); } static void @@ -457,7 +457,7 @@ destroy_drag_window (GtkToolItem *toolitem) { if (toolitem->priv->drag_window) { - gdk_window_set_user_data (toolitem->priv->drag_window, NULL); + gtk_widget_unregister_window (GTK_WIDGET (toolitem), toolitem->priv->drag_window); gdk_window_destroy (toolitem->priv->drag_window); toolitem->priv->drag_window = NULL; } |