#if GTK_CHECK_VERSION (2, 90, 8)
static gboolean
ev_view_presentation_draw (GtkWidget *widget,
- cairo_t *cr,
- int draw_width G_GNUC_UNUSED,
- int draw_height G_GNUC_UNUSED)
+ cairo_t *cr)
#else
static gboolean
ev_view_presentation_expose_event (GtkWidget *widget,
if (ev_transition_animation_ready (pview->animation)) {
ev_view_presentation_get_page_area (pview, &page_area);
-#if !GTK_CHECK_VERSION (2, 90, 8)
+#if GTK_CHECK_VERSION (2, 90, 8)
+ cairo_save (cr);
+#else
cr = gdk_cairo_create (gtk_widget_get_window (widget));
#endif
ev_transition_animation_paint (pview->animation, cr, page_area);
-#if !GTK_CHECK_VERSION (2, 90, 8)
+#if GTK_CHECK_VERSION (2, 90, 8)
+ cairo_restore (cr);
+#else
cairo_destroy (cr);
#endif
}
ev_view_presentation_get_page_area (pview, &page_area);
if (gdk_rectangle_intersect (&page_area, area, &overlap)) {
-#if !GTK_CHECK_VERSION (2, 90, 8)
+#if GTK_CHECK_VERSION (2, 90, 8)
+ cairo_save (cr);
+#else
cr = gdk_cairo_create (gtk_widget_get_window (widget));
#endif
cairo_set_source_surface (cr, surface, page_area.x, page_area.y);
cairo_fill (cr);
-#if !GTK_CHECK_VERSION (2, 90, 8)
+#if GTK_CHECK_VERSION (2, 90, 8)
+ cairo_restore (cr);
+#else
cairo_destroy (cr);
#endif
}
GdkEventScroll *event);
#if GTK_CHECK_VERSION (2, 90, 8)
static gboolean ev_view_draw (GtkWidget *widget,
- cairo_t *cr,
- int draw_width,
- int draw_height);
+ cairo_t *cr);
#else
static gboolean ev_view_expose_event (GtkWidget *widget,
GdkEventExpose *event);
#if GTK_CHECK_VERSION (2, 90, 8)
static gboolean
ev_view_draw (GtkWidget *widget,
- cairo_t *cr,
- int draw_width G_GNUC_UNUSED,
- int draw_height G_GNUC_UNUSED)
+ cairo_t *cr)
#else
static gboolean
ev_view_expose_event (GtkWidget *widget,
#if GTK_CHECK_VERSION (2, 90, 8)
if (GTK_WIDGET_CLASS (ev_view_parent_class)->draw)
- GTK_WIDGET_CLASS (ev_view_parent_class)->draw (widget, cr, draw_width, draw_height);
+ GTK_WIDGET_CLASS (ev_view_parent_class)->draw (widget, cr);
#else
cairo_destroy (cr);