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



commit 29c0ecb13dba5c567210655d4029f36ac7bead71
Author: Benjamin Otte <otte redhat com>
Date:   Mon Sep 20 16:44:06 2010 +0200

    testutils: Get rid of gdk_drawable_get_size() usage

 gtk/gtktestutils.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtktestutils.c b/gtk/gtktestutils.c
index cedb5e7..c2306fe 100644
--- a/gtk/gtktestutils.c
+++ b/gtk/gtktestutils.c
@@ -201,9 +201,9 @@ gtk_test_spin_button_click (GtkSpinButton  *spinner,
 
   if (panel)
     {
-      gint width, height, pos;
-      gdk_drawable_get_size (panel, &width, &height);
-      pos = upwards ? 0 : height - 1;
+      gint width, pos;
+      width = gdk_window_get_width (panel);
+      pos = upwards ? 0 : gdk_window_get_height (panel) - 1;
       b1res = gdk_test_simulate_button (panel, width - 1, pos, button, 0, GDK_BUTTON_PRESS);
       b2res = gdk_test_simulate_button (panel, width - 1, pos, button, 0, GDK_BUTTON_RELEASE);
     }



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