aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-01-22 09:17:41 +0100
committerSven Gothel <[email protected]>2023-01-22 09:17:41 +0100
commitbd2004b140f12afeb2e2337a1b426a212b1ba492 (patch)
tree799a2df613fda22709ab229c50e654947022d943 /src/newt
parentbe4fa1f3fc1a97ad712b8d907e611a99c2bd4c83 (diff)
Execute AWT's Frame.setTitle() on AWT-EDT if already visible (avoid rare deadlock)
Diffstat (limited to 'src/newt')
-rw-r--r--src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java
index 860ee9188..8cd2a1f32 100644
--- a/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/awt/WindowDriver.java
@@ -49,6 +49,7 @@ import jogamp.nativewindow.awt.AWTMisc;
import jogamp.newt.WindowImpl;
import com.jogamp.common.os.Platform;
+import com.jogamp.common.util.awt.AWTEDTExecutor;
import com.jogamp.nativewindow.awt.AWTGraphicsConfiguration;
import com.jogamp.nativewindow.awt.AWTGraphicsDevice;
import com.jogamp.nativewindow.awt.AWTGraphicsScreen;
@@ -97,7 +98,11 @@ public class WindowDriver extends WindowImpl {
@Override
protected void setTitleImpl(final String title) {
if (awtFrame != null) {
- awtFrame.setTitle(title);
+ AWTEDTExecutor.singleton.invoke(false, new Runnable() {
+ @Override
+ public void run() {
+ awtFrame.setTitle(title);
+ } } );
}
}