diff options
author | Alexander Larsson <alexl@redhat.com> | 2012-08-31 17:03:34 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2012-08-31 18:27:23 +0200 |
commit | a9557b4dd1bd63de0c122d546ec0b13be3f26e53 (patch) | |
tree | ad8543cb32d42dd54d75a85bba2e52069a4cf072 | |
parent | df165ab9c128db38e6664509d3b94d4999adacca (diff) |
Make region code build with gtk2
https://bugs.freedesktop.org/show_bug.cgi?id=54277
-rw-r--r-- | gtk/spice-widget-cairo.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk/spice-widget-cairo.c b/gtk/spice-widget-cairo.c index cd310cd..8f424cb 100644 --- a/gtk/spice-widget-cairo.c +++ b/gtk/spice-widget-cairo.c @@ -74,6 +74,14 @@ void spicex_image_destroy(SpiceDisplay *display) d->convert = FALSE; } +#if !GTK_CHECK_VERSION (3, 0, 0) +#define cairo_rectangle_int_t GdkRectangle +#define cairo_region_t GdkRegion +#define cairo_region_create_rectangle gdk_region_rectangle +#define cairo_region_subtract_rectangle(_dest,_rect) { GdkRegion *_region = gdk_region_rectangle (_rect); gdk_region_subtract (_dest, _region); } +#define cairo_region_destroy gdk_region_destroy +#endif + G_GNUC_INTERNAL void spicex_draw_event(SpiceDisplay *display, cairo_t *cr) { |