diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2014-08-21 15:55:22 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2014-08-21 15:55:22 +0100 |
commit | f0d77ec24a27b56a332e4634fe03d6ea880a0805 (patch) | |
tree | ed8fec57db86a8fcbef5eecc9c09e5aef45415b0 | |
parent | 7efe5c0082501be3f6ccc9a29b983c9c6aedb858 (diff) | |
download | clutter-gtk-f0d77ec24a27b56a332e4634fe03d6ea880a0805.tar.gz |
offscreen: Fix deprecation warnings
Don't use deprecated API, or disable deprecation warnings if that's not
possible without a more thorough investigation.
-rw-r--r-- | clutter-gtk/gtk-clutter-offscreen.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/clutter-gtk/gtk-clutter-offscreen.c b/clutter-gtk/gtk-clutter-offscreen.c index 9042401..c54010d 100644 --- a/clutter-gtk/gtk-clutter-offscreen.c +++ b/clutter-gtk/gtk-clutter-offscreen.c @@ -115,6 +115,7 @@ gtk_clutter_offscreen_realize (GtkWidget *widget) gint attributes_mask; guint border_width; GtkWidget *parent, *child; + GdkScreen *screen; gtk_widget_set_realized (widget, TRUE); @@ -135,8 +136,9 @@ gtk_clutter_offscreen_realize (GtkWidget *widget) attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL; parent = gtk_widget_get_parent (widget); + screen = gtk_widget_get_screen (widget); - window = gdk_window_new (gtk_widget_get_root_window (widget), + window = gdk_window_new (gdk_screen_get_root_window (screen), &attributes, attributes_mask); gtk_widget_set_window (widget, window); @@ -318,7 +320,11 @@ static void _gtk_clutter_offscreen_init (GtkClutterOffscreen *offscreen) { gtk_widget_set_has_window (GTK_WIDGET (offscreen), TRUE); + + G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_container_set_resize_mode (GTK_CONTAINER (offscreen), GTK_RESIZE_IMMEDIATE); + G_GNUC_END_IGNORE_DEPRECATIONS + offscreen->active = TRUE; } |