Make set_cairo_surface_size a vfunc on GdkWindowImpl

Note the special implementation of this method on GdkOffscreenWindow
that makes sure its current surface is not destroyed.
This commit is contained in:
Kristian Rietveld
2010-10-05 15:21:40 +02:00
parent a472d1a400
commit eca2af5230
10 changed files with 65 additions and 37 deletions

View File

@ -1086,6 +1086,18 @@ _gdk_quartz_window_destroy (GdkWindow *window,
}
}
static cairo_surface_t *
gdk_window_quartz_resize_cairo_surface (GdkWindow *window,
cairo_surface_t *surface,
gint width,
gint height)
{
/* Quartz surfaces cannot be resized */
cairo_surface_destroy (surface);
return NULL;
}
void
_gdk_windowing_window_destroy_foreign (GdkWindow *window)
{
@ -2986,6 +2998,7 @@ gdk_window_impl_iface_init (GdkWindowImplIface *iface)
iface->queue_antiexpose = _gdk_quartz_window_queue_antiexpose;
iface->translate = _gdk_quartz_window_translate;
iface->destroy = _gdk_quartz_window_destroy;
iface->resize_cairo_surface = gdk_window_quartz_resize_cairo_surface;
}