SimpleView.st
changeset 1261 15adeadfaa0e
parent 1259 60af09384d13
child 1290 1cc24cff6fe9
--- a/SimpleView.st	Tue Jan 21 18:32:28 1997 +0100
+++ b/SimpleView.st	Tue Jan 21 18:44:24 1997 +0100
@@ -6353,39 +6353,38 @@
             ex return.
         ] do:[
             [
-                windowGroup startupModal:[realized and:aBlock] forGroup:mainGroup
-            ] valueOnUnwindDo:[
+                [
+                    windowGroup startupModal:[realized and:aBlock] forGroup:mainGroup
+                ] valueOnUnwindDo:[
+"/                    mainGroup notNil ifTrue:[
+"/                        self isPopUpView ifFalse:[
+"/                            mainGroup restoreCursors.
+"/                        ].
+"/                    ].
+                    self hide
+                ]
+            ] valueNowOrOnUnwindDo:[
                 mainGroup notNil ifTrue:[
-                    self isPopUpView ifFalse:[
-                        mainGroup restoreCursors.
+                    ReturnFocusWhenClosingModalBoxes ifTrue:[
+                        "
+                         return input focus to previously active groups top.
+                         This helps with windowmanagers which need an explicit click
+                         on the view for the focus.
+                        "
+                        tops := mainGroup topViews.
+                        (tops notNil and:[tops notEmpty]) ifTrue:[
+                            tops first getKeyboardFocus
+                        ]
                     ].
+
+                    "
+                     restore cursors in the main group & flush its buffered events
+                    "
+                    mainGroup restoreCursors.
                     mainGroup sensor flushUserEvents.
-                ].
-                self hide.
+                ]
             ]
         ].
-
-        "
-         restore cursors in the main group & flush its buffered events
-        "
-        mainGroup notNil ifTrue:[
-            mainGroup restoreCursors.
-            mainGroup sensor flushUserEvents.
-        ].
-
-        ReturnFocusWhenClosingModalBoxes ifTrue:[
-            "
-             return input focus to previously active groups top.
-             This helps with windowmanagers which need an explicit click
-             on the view for the focus.
-            "
-            mainGroup notNil ifTrue:[
-                tops := mainGroup topViews.
-                (tops notNil and:[tops notEmpty]) ifTrue:[
-                    tops first getKeyboardFocus
-                ]
-            ]
-        ]
     ]
 
     "Created: 10.12.1995 / 14:06:14 / cg"
@@ -6562,6 +6561,6 @@
 !SimpleView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.157 1997-01-21 14:47:23 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.158 1997-01-21 17:44:24 cg Exp $'
 ! !
 SimpleView initialize!