- if (gtk_widget_is_drawable (widget))
- {
- pixmap = gtk_offscreen_window_get_pixmap (offscreen);
-
- cr = gdk_cairo_create (widget->window);
- gdk_cairo_set_source_pixmap (cr, pixmap, 50, 50);
- cairo_paint (cr);
- cairo_destroy (cr);
- }
+ cairo_set_source_surface (cr,
+ gtk_offscreen_window_get_surface (offscreen),
+ 50, 50);
+ cairo_paint (cr);