examples: Update for deprecations

Stop using gdk_surface_create_similar_surface here.
This commit is contained in:
Matthias Clasen 2023-04-02 09:06:02 -04:00
parent 33b1624a9f
commit 7d4c757c58

View File

@ -31,10 +31,9 @@ resize_cb (GtkWidget *widget,
if (gtk_native_get_surface (gtk_widget_get_native (widget)))
{
surface = gdk_surface_create_similar_surface (gtk_native_get_surface (gtk_widget_get_native (widget)),
CAIRO_CONTENT_COLOR,
gtk_widget_get_width (widget),
gtk_widget_get_height (widget));
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
gtk_widget_get_width (widget),
gtk_widget_get_height (widget));
/* Initialize the surface to white */
clear_surface ();