From 7de1d70cfa9f7ead744916ae38e8f07a85b727c7 Mon Sep 17 00:00:00 2001 From: Andreas Persson Date: Sun, 11 Jul 2021 11:29:56 +0200 Subject: [PATCH] fix cairo drawing error when another frame closes If you have two CFrames open (for example two instances of the same plugin), and close one of them, the drawing in the other one starts to fail, with "the target surface has been finished" messages. The fix is simple: just remove the call to cairo_device_finish. cairo_device_destroy will call cairo_device_finish when it has decreased the refcount to zero. --- vstgui/lib/platform/linux/x11frame.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/vstgui/lib/platform/linux/x11frame.cpp b/vstgui/lib/platform/linux/x11frame.cpp index 8fe3525a4..785756ef3 100644 --- a/vstgui/lib/platform/linux/x11frame.cpp +++ b/vstgui/lib/platform/linux/x11frame.cpp @@ -121,7 +121,6 @@ struct DrawHandler ~DrawHandler () { - cairo_device_finish (device); cairo_device_destroy (device); }