aboutsummaryrefslogtreecommitdiffstats
path: root/libgnomecanvas/gnome-canvas-shape.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-14 01:50:49 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-06-15 00:55:49 +0800
commitfd8b55edaa88906b588aa07d9eadcacd34a7a774 (patch)
tree14fe95f503fefe738465ff4a734671afec0efb57 /libgnomecanvas/gnome-canvas-shape.c
parente8a1662875e3e957d96d4f60cb8b5664ee4f74b3 (diff)
downloadgsoc2013-evolution-fd8b55edaa88906b588aa07d9eadcacd34a7a774.tar
gsoc2013-evolution-fd8b55edaa88906b588aa07d9eadcacd34a7a774.tar.gz
gsoc2013-evolution-fd8b55edaa88906b588aa07d9eadcacd34a7a774.tar.bz2
gsoc2013-evolution-fd8b55edaa88906b588aa07d9eadcacd34a7a774.tar.lz
gsoc2013-evolution-fd8b55edaa88906b588aa07d9eadcacd34a7a774.tar.xz
gsoc2013-evolution-fd8b55edaa88906b588aa07d9eadcacd34a7a774.tar.zst
gsoc2013-evolution-fd8b55edaa88906b588aa07d9eadcacd34a7a774.zip
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.
Diffstat (limited to 'libgnomecanvas/gnome-canvas-shape.c')
-rw-r--r--libgnomecanvas/gnome-canvas-shape.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/libgnomecanvas/gnome-canvas-shape.c b/libgnomecanvas/gnome-canvas-shape.c
index 79d8124525..b951cbc014 100644
--- a/libgnomecanvas/gnome-canvas-shape.c
+++ b/libgnomecanvas/gnome-canvas-shape.c
@@ -648,12 +648,18 @@ gnome_canvas_shape_realize (GnomeCanvasItem *item)
(* parent_class->realize) (item);
if (!item->canvas->aa) {
+ GtkLayout *layout;
+ GdkWindow *bin_window;
+
gcbp_ensure_gdk (shape);
- g_assert(item->canvas->layout.bin_window != NULL);
+ layout = GTK_LAYOUT (item->canvas);
+ bin_window = gtk_layout_get_bin_window (layout);
+
+ g_assert (bin_window != NULL);
- shape->priv->gdk->fill_gc = gdk_gc_new (item->canvas->layout.bin_window);
- shape->priv->gdk->outline_gc = gdk_gc_new (item->canvas->layout.bin_window);
+ shape->priv->gdk->fill_gc = gdk_gc_new (bin_window);
+ shape->priv->gdk->outline_gc = gdk_gc_new (bin_window);
}
}
@@ -1428,10 +1434,11 @@ gcbp_ensure_mask (GnomeCanvasShape * shape, gint width, gint height)
if ((width > ctx->width) || (height > ctx->height)) {
/* Ctx is too small */
-
+ GtkWidget *widget;
GdkWindow * window;
- window = ((GtkWidget *) (((GnomeCanvasItem *) shape)->canvas))->window;
+ widget = GTK_WIDGET (GNOME_CANVAS_ITEM (shape)->canvas);
+ window = gtk_widget_get_window (widget);
if (ctx->clear_gc) g_object_unref (ctx->clear_gc);
if (ctx->xor_gc) g_object_unref (ctx->xor_gc);