[gtk+/refactor: 110/137] tests/testtooltips.c: Use accessor functions to access GtkWidget
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/refactor: 110/137] tests/testtooltips.c: Use accessor functions to access GtkWidget
- Date: Mon, 16 Aug 2010 04:17:41 +0000 (UTC)
commit e0e74d21c8b74546656ac849ff3fa21109f3f6b5
Author: Javier Jardón <jjardon gnome org>
Date: Mon Aug 16 00:31:53 2010 +0200
tests/testtooltips.c: Use accessor functions to access GtkWidget
tests/testtooltips.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/tests/testtooltips.c b/tests/testtooltips.c
index 8aee958..c228c23 100644
--- a/tests/testtooltips.c
+++ b/tests/testtooltips.c
@@ -209,16 +209,19 @@ drawing_area_expose (GtkWidget *drawing_area,
GdkEventExpose *event,
gpointer data)
{
+ GtkAllocation allocation;
+ GdkWindow *window;
gint i;
cairo_t *cr;
- gdk_window_get_pointer (drawing_area->window, NULL, NULL, NULL);
+ window = gtk_widget_get_window (drawing_area);
- cr = gdk_cairo_create (drawing_area->window);
+ gdk_window_get_pointer (window, NULL, NULL, NULL);
- cairo_rectangle (cr, 0, 0,
- drawing_area->allocation.width,
- drawing_area->allocation.height);
+ cr = gdk_cairo_create (window);
+
+ gtk_widget_get_allocation (drawing_area, &allocation);
+ cairo_rectangle (cr, 0, 0, allocation.width, allocation.height);
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
cairo_fill (cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]