From 2aaa8b76cf3177d0388122d465481b632d74e95c Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 22 May 2013 14:41:29 +0200 Subject: [PATCH] window: Apply buffer_scale automatically in widget_cairo_create --- clients/window.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clients/window.c b/clients/window.c index 60b78a5c..858ba779 100644 --- a/clients/window.c +++ b/clients/window.c @@ -1650,11 +1650,13 @@ widget_cairo_update_transform(struct widget *widget, cairo_t *cr) enum wl_output_transform transform; int surface_width, surface_height; int translate_x, translate_y; + uint32_t scale; surface_width = surface->allocation.width; surface_height = surface->allocation.height; transform = surface->buffer_transform; + scale = surface->buffer_scale; switch (transform) { case WL_OUTPUT_TRANSFORM_FLIPPED: @@ -1712,6 +1714,7 @@ widget_cairo_update_transform(struct widget *widget, cairo_t *cr) break; } + cairo_scale(cr, scale, scale); cairo_translate(cr, translate_x, translate_y); cairo_rotate(cr, angle); cairo_transform(cr, &m);