private->implicit_paint != NULL)
return FALSE; /* Don't stack implicit paints */
+ if (private->outstanding_surfaces != 0)
+ return FALSE; /* May conflict with direct drawing to cairo surface */
+
/* Never do implicit paints for foreign windows, they don't need
* double buffer combination since they have no client side children,
* and creating pixmaps for them is risky since they could disappear
gdk_region_destroy (exposing);
}
- if (1) /* Enable flicker free handling of moves. */
+ if (impl_window->outstanding_surfaces == 0) /* Enable flicker free handling of moves. */
append_move_region (impl_window, region, dx, dy);
else
do_move_region_bits_on_impl (impl_window,
GdkWindowObject *private = (GdkWindowObject*) data;
private->cairo_surface = NULL;
+ private->impl_window->outstanding_surfaces--;
}
static cairo_surface_t *
source = _gdk_drawable_get_source_drawable (drawable);
- /* TODO: Avoid the typecheck crap by adding virtual call */
private->cairo_surface = _gdk_drawable_create_cairo_surface (source, width, height);
if (private->cairo_surface)
{
+ private->impl_window->outstanding_surfaces++;
+
cairo_surface_set_device_offset (private->cairo_surface,
private->abs_x,
private->abs_y);