Revision: 18232
http://sourceforge.net/p/gate/code/18232
Author: markagreenwood
Date: 2014-08-05 12:47:21 +0000 (Tue, 05 Aug 2014)
Log Message:
-----------
force the GUI unlock to always happen on the EDT
Modified Paths:
--------------
gate/trunk/src/main/gate/gui/MainFrame.java
Modified: gate/trunk/src/main/gate/gui/MainFrame.java
===================================================================
--- gate/trunk/src/main/gate/gui/MainFrame.java 2014-08-05 01:19:24 UTC (rev
18231)
+++ gate/trunk/src/main/gate/gui/MainFrame.java 2014-08-05 12:47:21 UTC (rev
18232)
@@ -2207,18 +2207,30 @@
}
public synchronized static void unlockGUI() {
- // check whether GUI is up
- if(getGuiRoots() == null || getGuiRoots().isEmpty()) return;
+
+ Thread t = new Thread() {
+ public void run() {
+ // check whether GUI is up
+ if(getGuiRoots() == null || getGuiRoots().isEmpty()) return;
- if(guiLock != null) {
- guiLock.setVisible(false);
- // completely dispose the dialog (causes it to disappear even if
- // displayed on a non-visible virtual display on Linux)
- // fix for bug 1369096
- //
(http://sourceforge.net/tracker/index.php?func=detail&aid=1369096&group_id=143829&atid=756796)
- guiLock.dispose();
+ if(guiLock != null) {
+ guiLock.setVisible(false);
+ // completely dispose the dialog (causes it to disappear even if
+ // displayed on a non-visible virtual display on Linux)
+ // fix for bug 1369096
+ //
(http://sourceforge.net/tracker/index.php?func=detail&aid=1369096&group_id=143829&atid=756796)
+ guiLock.dispose();
+ }
+ guiLock = null;
+ }
+ };
+
+ if (SwingUtilities.isEventDispatchThread()) {
+ t.start();
}
- guiLock = null;
+ else {
+ SwingUtilities.invokeLater(t);
+ }
}
/** Flag to protect Frame title to be changed */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs