diff --git a/Dorkbox-Util/src/dorkbox/util/jna/linux/GtkSupport.java b/Dorkbox-Util/src/dorkbox/util/jna/linux/GtkSupport.java index f3b1378..ba06771 100644 --- a/Dorkbox-Util/src/dorkbox/util/jna/linux/GtkSupport.java +++ b/Dorkbox-Util/src/dorkbox/util/jna/linux/GtkSupport.java @@ -200,13 +200,20 @@ class GtkSupport { started = false; - new Thread(new Runnable() { + // put it in a NEW dispatch event (so that we cleanup AFTER this one is finished) + dispatch(new Runnable() { @Override public void run() { - // this should happen in a new thread - gtkDispatchThread.interrupt(); + new Thread(new Runnable() { + @Override + public + void run() { + // this should happen in a new thread + gtkDispatchThread.interrupt(); + } + }).run(); } - }).run(); + }); } }