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/gtktexthandle.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/gtktexthandle.c')
-rw-r--r-- | gtk/gtktexthandle.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c index 6c7033b28a..871b3ac73e 100644 --- a/gtk/gtktexthandle.c +++ b/gtk/gtktexthandle.c @@ -197,7 +197,7 @@ _gtk_text_handle_create_window (GtkTextHandle *handle, window = gdk_window_new (gtk_widget_get_root_window (priv->parent), &attributes, mask); - gdk_window_set_user_data (window, priv->parent); + gtk_widget_register_window (priv->parent, window); gdk_window_set_background_rgba (window, &bg); _gtk_text_handle_update_shape (handle, window, pos); @@ -304,6 +304,7 @@ _gtk_text_handle_update_window (GtkTextHandle *handle, width / 2, 0, &x, &y); } + gtk_widget_unregister_window (priv->parent, handle_window->window); gdk_window_destroy (handle_window->window); /* Create new window and apply old state */ |