From 855a06e020b4ce2f3261f588df68e433754d48b3 Mon Sep 17 00:00:00 2001 From: developer Date: Wed, 2 Jan 2019 18:30:39 -0500 Subject: [PATCH] Fix #1611 --- source/gx/tilix/session.d | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/gx/tilix/session.d b/source/gx/tilix/session.d index a09d58bb..2ffd90c0 100644 --- a/source/gx/tilix/session.d +++ b/source/gx/tilix/session.d @@ -1019,7 +1019,12 @@ private: cr.paint(); //Draw child onto temporary image so it doesn't overdraw background - ImageSurface isChildSurface = ImageSurface.create(cairo_format_t.ARGB32, child.getAllocatedWidth(), child.getAllocatedHeight()); + import cairo.Surface: Surface; + Surface isChildSurface = cr.getTarget().createSimilar(cairo_content_t.COLOR_ALPHA, child.getAllocatedWidth(), child.getAllocatedHeight()); + if (isChildSurface is null) { + trace("****** ImageSurface is null"); + isChildSurface = ImageSurface.create(cairo_format_t.ARGB32, child.getAllocatedWidth(), child.getAllocatedHeight()); + } Context crChild = Context.create(isChildSurface); scope (exit) { crChild.destroy();