[clutter-gtk] offscreen: Fix deprecation warnings
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter-gtk] offscreen: Fix deprecation warnings
- Date: Thu, 21 Aug 2014 15:23:28 +0000 (UTC)
commit f0d77ec24a27b56a332e4634fe03d6ea880a0805
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Aug 21 15:55:22 2014 +0100
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 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]