[gtk+/rendering-cleanup-next: 184/199] tests: Get rid of gdk_drawable_get_size() usage in offscreenbox
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup-next: 184/199] tests: Get rid of gdk_drawable_get_size() usage in offscreenbox
- Date: Thu, 23 Sep 2010 21:34:34 +0000 (UTC)
commit d90b355c3013ba7d29cf6e8ed557300e3ba2ec91
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 8c025df..c8e6250 100644
--- a/tests/gtkoffscreenbox.c
+++ b/tests/gtkoffscreenbox.c
@@ -626,13 +626,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),
@@ -641,13 +640,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]