[gtk+/rendering-cleanup-next] tests: Get rid of gdk_drawable_get_size() usage in offscreenbox



commit a18c0023a2e2b5e3445987a1ce777b8438bf4662
Author: Benjamin Otte <otte redhat com>
Date:   Mon Sep 20 16:49:11 2010 +0200

    tests: Get rid of gdk_drawable_get_size() usage in offscreenbox

 tests/gtkoffscreenbox.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/tests/gtkoffscreenbox.c b/tests/gtkoffscreenbox.c
index d8af076..ac0f4ba 100644
--- a/tests/gtkoffscreenbox.c
+++ b/tests/gtkoffscreenbox.c
@@ -624,13 +624,12 @@ gtk_offscreen_box_draw (GtkWidget *widget,
     }
   else if (gtk_cairo_should_draw_window (cr, offscreen_box->offscreen_window1))
     {
-      gint w, h;
-
-      gdk_drawable_get_size (offscreen_box->offscreen_window1, &w, &h);
       gtk_paint_flat_box (gtk_widget_get_style (widget), cr,
                           GTK_STATE_NORMAL, GTK_SHADOW_NONE,
                           widget, "blah",
-                          0, 0, w, h);
+                          0, 0,
+                          gdk_window_get_width (offscreen_box->offscreen_window1),
+                          gdk_window_get_height (offscreen_box->offscreen_window1));
 
       if (offscreen_box->child1)
         gtk_container_propagate_draw (GTK_CONTAINER (widget),
@@ -639,13 +638,12 @@ gtk_offscreen_box_draw (GtkWidget *widget,
     }
   else if (gtk_cairo_should_draw_window (cr, offscreen_box->offscreen_window2))
     {
-      gint w, h;
-
-      gdk_drawable_get_size (offscreen_box->offscreen_window2, &w, &h);
       gtk_paint_flat_box (gtk_widget_get_style (widget), cr,
                           GTK_STATE_NORMAL, GTK_SHADOW_NONE,
                           widget, "blah",
-                          0, 0, w, h);
+                          0, 0,
+                          gdk_window_get_width (offscreen_box->offscreen_window2),
+                          gdk_window_get_height (offscreen_box->offscreen_window2));
 
       if (offscreen_box->child2)
         gtk_container_propagate_draw (GTK_CONTAINER (widget),



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