[gtk+] Remove deprecation warnings from demos and tests



commit 4caf302498a82ddeccffc4a733a7e42bbfa086f6
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jan 24 21:08:59 2014 -0500

    Remove deprecation warnings from demos and tests
    
    There were a few uses of gtk_widget_get_root_window that
    need to be removed.

 demos/gtk-demo/offscreen_window.c  |    2 +-
 demos/gtk-demo/offscreen_window2.c |    2 +-
 tests/gtkoffscreenbox.c            |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/demos/gtk-demo/offscreen_window.c b/demos/gtk-demo/offscreen_window.c
index 7c141e1..ee542b3 100644
--- a/demos/gtk-demo/offscreen_window.c
+++ b/demos/gtk-demo/offscreen_window.c
@@ -279,7 +279,7 @@ gtk_rotated_bin_realize (GtkWidget *widget)
       attributes.width = child_allocation.width;
       attributes.height = child_allocation.height;
     }
-  bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
+  bin->offscreen_window = gdk_window_new (gdk_screen_get_root_window (gtk_widget_get_screen (widget)),
                                           &attributes, attributes_mask);
   gdk_window_set_user_data (bin->offscreen_window, widget);
   if (bin->child)
diff --git a/demos/gtk-demo/offscreen_window2.c b/demos/gtk-demo/offscreen_window2.c
index fa67a59..b327f71 100644
--- a/demos/gtk-demo/offscreen_window2.c
+++ b/demos/gtk-demo/offscreen_window2.c
@@ -218,7 +218,7 @@ gtk_mirror_bin_realize (GtkWidget *widget)
       attributes.width = child_allocation.width;
       attributes.height = child_allocation.height;
     }
-  bin->offscreen_window = gdk_window_new (gtk_widget_get_root_window (widget),
+  bin->offscreen_window = gdk_window_new (gdk_screen_get_root_window (gtk_widget_get_screen (widget)),
                                           &attributes, attributes_mask);
   gdk_window_set_user_data (bin->offscreen_window, widget);
   if (bin->child)
diff --git a/tests/gtkoffscreenbox.c b/tests/gtkoffscreenbox.c
index 7aeb82c..29140a1 100644
--- a/tests/gtkoffscreenbox.c
+++ b/tests/gtkoffscreenbox.c
@@ -305,7 +305,7 @@ gtk_offscreen_box_realize (GtkWidget *widget)
       attributes.height = child_area.height;
       start_y += child_area.height;
     }
-  offscreen_box->offscreen_window1 = gdk_window_new (gtk_widget_get_root_window (widget),
+  offscreen_box->offscreen_window1 = gdk_window_new (gdk_screen_get_root_window (gtk_widget_get_screen 
(widget)),
                                                     &attributes, attributes_mask);
   gdk_window_set_user_data (offscreen_box->offscreen_window1, widget);
   if (offscreen_box->child1)
@@ -329,7 +329,7 @@ gtk_offscreen_box_realize (GtkWidget *widget)
       attributes.width = child_area.width;
       attributes.height = child_area.height;
     }
-  offscreen_box->offscreen_window2 = gdk_window_new (gtk_widget_get_root_window (widget),
+  offscreen_box->offscreen_window2 = gdk_window_new (gdk_screen_get_root_window (gtk_widget_get_screen 
(widget)),
                                                     &attributes, attributes_mask);
   gdk_window_set_user_data (offscreen_box->offscreen_window2, widget);
   if (offscreen_box->child2)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]