From ea83c7e006c062ef003b58ec9192a9c77a8b638b Mon Sep 17 00:00:00 2001 From: nathan Date: Sat, 21 Jan 2017 14:58:00 +0100 Subject: [PATCH] Added option to debug EDT --- src/dorkbox/systemTray/jna/linux/Gtk.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dorkbox/systemTray/jna/linux/Gtk.java b/src/dorkbox/systemTray/jna/linux/Gtk.java index 5696609..f7630f1 100644 --- a/src/dorkbox/systemTray/jna/linux/Gtk.java +++ b/src/dorkbox/systemTray/jna/linux/Gtk.java @@ -57,6 +57,9 @@ class Gtk { private static final boolean alreadyRunningGTK; + // when debugging the EDT, we need a longer timeout. + private static final boolean debugEDT = false; + // This is required because the EDT needs to have it's own value for this boolean, that is a different value than the main thread private static ThreadLocal isDispatch = new ThreadLocal() { @Override @@ -66,7 +69,8 @@ class Gtk { } }; - private static final int TIMEOUT = 2; + // timeout is in seconds + private static final int TIMEOUT = debugEDT ? 10000000 : 2; // objdump -T /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 | grep gtk // objdump -T /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 | grep gtk