Revision: 4357
          http://vexi.svn.sourceforge.net/vexi/?rev=4357&view=rev
Author:   clrg
Date:     2012-02-21 11:07:54 +0000 (Tue, 21 Feb 2012)
Log Message:
-----------
Fix #62 - frame Close not respecting blocking traps

Modified Paths:
--------------
    trunk/org.vexi-core.main/src/main/java/org/vexi/plat/Swing.java

Modified: trunk/org.vexi-core.main/src/main/java/org/vexi/plat/Swing.java
===================================================================
--- trunk/org.vexi-core.main/src/main/java/org/vexi/plat/Swing.java     
2012-02-21 11:01:08 UTC (rev 4356)
+++ trunk/org.vexi-core.main/src/main/java/org/vexi/plat/Swing.java     
2012-02-21 11:07:54 UTC (rev 4357)
@@ -34,6 +34,7 @@
 import javax.swing.ImageIcon;
 import javax.swing.JFrame;
 import javax.swing.JLabel;
+import javax.swing.WindowConstants;
 
 import org.ibex.util.Callable;
 import org.vexi.core.Box;
@@ -158,7 +159,7 @@
         public void _setLocation(int x, int y) { if (window != null) 
window.setLocation(x, y); }
         public void _setTitleBarText(String s) { if (frame != null) 
frame.setTitle(s); }
         public void setInvisible(boolean b) { window.setVisible(!b); }
-        public void _setIcon(final Picture i) { 
+        public void _setIcon(final Picture i) {
             if (frame == null) {
                 return;
             }
@@ -512,7 +513,9 @@
             super(root);
             try {
                 if (framed) {
-                    window = frame = new InnerFrame();
+                    frame = new InnerFrame();
+                    
frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
+                    window = frame;
                     // ensures user cannot resize frame to be smaller than 
contents
                     // FIXME: this does not work on Linux
 //                    
frame.addComponentListener(((InnerFrame)frame).enforceMinSize);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to