mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-05-10 06:02:10 -05:00
GTK: never deliberately create an image surface for Cairo rendering
If gdk_window_create_similar_surface() isn't available, we now fall back to cairo_surface_create_similar(). This is relevant only on GTK between 2.00 and 2.22 with deprecated calls disabled.
This commit is contained in:
parent
8260ea2237
commit
08bc670304
@ -812,8 +812,11 @@ static void drawing_area_setup(GtkFrontend *inst, int width, int height)
|
||||
gtk_widget_get_window(inst->area),
|
||||
CAIRO_CONTENT_COLOR, inst->backing_w, inst->backing_h);
|
||||
#else
|
||||
inst->surface = cairo_image_surface_create(
|
||||
CAIRO_FORMAT_ARGB32, inst->backing_w, inst->backing_h);
|
||||
cairo_t *tmp_cr = gdk_cairo_create(gtk_widget_get_window(inst->area));
|
||||
inst->surface = cairo_surface_create_similar(
|
||||
cairo_get_target(tmp_cr),
|
||||
CAIRO_CONTENT_COLOR, inst->backing_w, inst->backing_h);
|
||||
cairo_destroy(tmp_cr);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user