diff options
author | Jasmine Hassan <[email protected]> | 2012-10-31 07:16:33 +0200 |
---|---|---|
committer | Jasmine Hassan <[email protected]> | 2012-11-02 16:25:25 +0200 |
commit | ea7bc87871154c2239f25d84191add2d4b630022 (patch) | |
tree | cc0b5ae5daec37c715d4cfa3f60eea8be72b7811 /eel/eel-canvas.c | |
parent | ec92a520965f420af7d00ad8e347f62106bbc578 (diff) | |
download | caja-ea7bc87871154c2239f25d84191add2d4b630022.tar.bz2 caja-ea7bc87871154c2239f25d84191add2d4b630022.tar.xz |
[eel] Use GdkRegion on GTK2, cairo_region_t on GTK3
http://git.gnome.org/browse/nautilus/commit/?id=3b671558f1d8ac1ee72e8af13d4ede6ab549a400
Diffstat (limited to 'eel/eel-canvas.c')
-rw-r--r-- | eel/eel-canvas.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/eel/eel-canvas.c b/eel/eel-canvas.c index a4d6612d..43c111f6 100644 --- a/eel/eel-canvas.c +++ b/eel/eel-canvas.c @@ -73,6 +73,12 @@ #include "eel-marshal.h" +/* Some compatibility defines to let us build on both Gtk2 and Gtk3 */ +#if !GTK_CHECK_VERSION (3, 0, 0) +#define cairo_region_contains_rectangle gdk_region_rect_in +#define CAIRO_REGION_OVERLAP_OUT GDK_OVERLAP_RECTANGLE_OUT +#endif + static void eel_canvas_request_update (EelCanvas *canvas); static void group_add (EelCanvasGroup *group, EelCanvasItem *item); @@ -1553,7 +1559,7 @@ eel_canvas_group_draw (EelCanvasItem *item, GdkDrawable *drawable, child_rect.width = child->x2 - child->x1 + 1; child_rect.height = child->y2 - child->y1 + 1; - if (gdk_region_rect_in (expose->region, &child_rect) != GDK_OVERLAP_RECTANGLE_OUT) + if (cairo_region_contains_rectangle (expose->region, &child_rect) != CAIRO_REGION_OVERLAP_OUT) (* EEL_CANVAS_ITEM_GET_CLASS (child)->draw) (child, drawable, expose); } } |