From f0d77ec24a27b56a332e4634fe03d6ea880a0805 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 21 Aug 2014 15:55:22 +0100 Subject: offscreen: Fix deprecation warnings Don't use deprecated API, or disable deprecation warnings if that's not possible without a more thorough investigation. --- clutter-gtk/gtk-clutter-offscreen.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.1