summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2015-09-15 13:19:31 +0200
committerCarlos Garnacho <carlosg@gnome.org>2015-09-15 13:23:53 +0200
commitd9a738dface57998f3c086cec17b08fc92189f55 (patch)
treefd87768285af8ae05feca44df959f95a02576c89 /demos
parenta526f15b7dea45aab3283d5e66645559aad744b2 (diff)
downloadgtk+-d9a738dface57998f3c086cec17b08fc92189f55.tar.gz
gtk-demo: Fix drawing of gestures demo feedback on CSD windows
It was wiping the translation initially applied to the cairo_t, so pick that up first before applying our own matrix changes.
Diffstat (limited to 'demos')
-rw-r--r--demos/gtk-demo/gestures.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/demos/gtk-demo/gestures.c b/demos/gtk-demo/gestures.c
index b5a29583c2..f8e475817d 100644
--- a/demos/gtk-demo/gestures.c
+++ b/demos/gtk-demo/gestures.c
@@ -86,9 +86,10 @@ drawing_area_draw (GtkWidget *widget,
cairo_matrix_t matrix;
gdouble angle, scale;
- cairo_matrix_init_translate (&matrix,
- allocation.width / 2,
- allocation.height / 2);
+ cairo_get_matrix (cr, &matrix);
+ cairo_matrix_translate (&matrix,
+ allocation.width / 2,
+ allocation.height / 2);
cairo_save (cr);