Fix a deadlock when opening scinotes under Windows 98/12998/2
Calixte DENIZET [Thu, 24 Oct 2013 13:42:29 +0000 (15:42 +0200)]
Change-Id: I0dfbf14e4ce6a5e09c9332d73cc7aefa9d431115

scilab/modules/gui/src/java/org/scilab/modules/gui/utils/WindowsConfigurationManager.java

index 2ef982e..42a6475 100644 (file)
@@ -478,13 +478,14 @@ public class WindowsConfigurationManager implements XConfigurationListener {
                                     }
                                 }
 
-                                window.setVisible(true);
-                                window.requestFocus();
-                                window.toFront();
-                                window.setIsRestoring(false);
                                 SwingUtilities.invokeLater(new Runnable() {
                                     @Override
                                     public void run() {
+                                        window.setVisible(true);
+                                        window.requestFocus();
+                                        window.toFront();
+                                        window.setIsRestoring(false);
+
                                         ActiveDockableTracker.requestDockableActivation(mainTab);
                                     }
                                 });
@@ -494,8 +495,13 @@ public class WindowsConfigurationManager implements XConfigurationListener {
                     }
                 });
             } else {
-                window.setIsRestoring(false);
-                window.setVisible(true);
+                SwingUtilities.invokeLater(new Runnable() {
+                    @Override
+                    public void run() {
+                        window.setIsRestoring(false);
+                        window.setVisible(true);
+                    }
+                });
             }
         }