From 680030d37889864fb57181c875f2c288a4cf997c Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Tue, 8 Jun 2021 23:04:33 -0400 Subject: [PATCH] oops --- minigui.d | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/minigui.d b/minigui.d index d1cedf5..1d0d6ec 100644 --- a/minigui.d +++ b/minigui.d @@ -6172,8 +6172,11 @@ class Window : Widget { win.close(); // I synchronize here upon window closing to ensure all child windows // get updated too before the event loop. This avoids some random X errors. - static if(UsingSimpledisplayX11) - XSync(XDisplayConnection.get, false); + static if(UsingSimpledisplayX11) { + runInGuiThread( { + XSync(XDisplayConnection.get, false); + }); + } } bool dispatchKeyEvent(KeyEvent ev) {