From c2c89fcb8cfa5661e94de5e57c7dbc80c3342ede Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 13 Jan 2010 12:50:49 -0500 Subject: Fix all remaining GTK3 issues. Work around the issue of GnomeCanvasItem amending its own flags to GtkObject::flags (which is sealed) by giving it its own flags field. This breaks libgnomecanvas ABI and API, but I see no other way. This commit didn't work the first time because gnome-pilot libraries were still pulling in the system-wide libgnomecanvas, and that was interfereing with our bundled version which has a different ABI. But gnome-pilot integration was dropped in the previous commit, so everything is now using the bundled libgnomecanvas. --- libgnomecanvas/gailcanvasitem.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libgnomecanvas/gailcanvasitem.c') diff --git a/libgnomecanvas/gailcanvasitem.c b/libgnomecanvas/gailcanvasitem.c index f059e1909c..5ae7c8bee3 100644 --- a/libgnomecanvas/gailcanvasitem.c +++ b/libgnomecanvas/gailcanvasitem.c @@ -199,7 +199,7 @@ gail_canvas_item_ref_state_set (AtkObject *obj) { item = GNOME_CANVAS_ITEM (g_obj); - if (item->object.flags & GNOME_CANVAS_ITEM_VISIBLE) + if (item->flags & GNOME_CANVAS_ITEM_VISIBLE) { atk_state_set_add_state (state_set, ATK_STATE_VISIBLE); if (is_item_on_screen (item)) @@ -482,14 +482,16 @@ is_item_in_window (GnomeCanvasItem *item, gint height) { GtkWidget *widget; + GdkWindow *window; gboolean retval; widget = GTK_WIDGET (item->canvas); - if (widget->window) + window = gtk_widget_get_window (widget); + if (window) { int window_width, window_height; - gdk_window_get_geometry (widget->window, NULL, NULL, + gdk_window_get_geometry (window, NULL, NULL, &window_width, &window_height, NULL); /* * Check whether rectangles intersect -- cgit