diff options
author | Sven Gothel <[email protected]> | 2023-01-22 09:17:41 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-01-22 09:17:41 +0100 |
commit | bd2004b140f12afeb2e2337a1b426a212b1ba492 (patch) | |
tree | 799a2df613fda22709ab229c50e654947022d943 /src/newt | |
parent | be4fa1f3fc1a97ad712b8d907e611a99c2bd4c83 (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.java | 7 |
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); + } } ); } } |