aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-03-30 11:53:12 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-03-30 11:53:12 +0200
commit1a76000d06c955471e8c3022d471adcee71cd6ac (patch)
tree75c7b5e42fbf327d824491c7193925a280b4c08b
parenta6433b5f9a97004c10bc9f88916a8a31f8d04c92 (diff)
callbacks: fix scale with gtk3
There's a missing call to scale the window, when built with gtk3. Add the missing call to cairo_scale(). Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--src/callbacks.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/callbacks.c b/src/callbacks.c
index e5e3921..336e13d 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -651,6 +651,10 @@ void draw_callback(GtkWidget *widget, cairo_t *cr, cam_t *cam)
window = gtk_widget_get_window(widget);
surface = gdk_cairo_surface_create_from_pixbuf(cam->pb, 1, window);
+
+ if (cam->scale != 1.f)
+ cairo_scale(cr, cam->scale, cam->scale);
+
cairo_set_source_surface(cr, surface, 0, 0);
gdk_cairo_rectangle(cr, &rect);
cairo_fill(cr);

Privacy Policy