WindowGroup.st
changeset 6849 aa2ed32883b6
parent 6832 ba8e8e138bb2
child 6850 269b832e38c7
--- a/WindowGroup.st	Sat Apr 25 03:42:32 2015 +0000
+++ b/WindowGroup.st	Thu Apr 30 19:31:38 2015 +0200
@@ -856,9 +856,16 @@
 !
 
 mainView
-    "return the mainview. Thats the first topView by default"
+    "return the mainview. That's the first topView by default"
+
+    |nonModalViews|
 
     topViews size == 0 ifTrue:[ ^ nil].
+    nonModalViews := topViews reject:[:t | t isModal].
+    nonModalViews notEmpty ifTrue:[ 
+        ^ nonModalViews first
+    ].
+    "/ mhmh - a modal application
     ^ topViews first
 !
 
@@ -2855,11 +2862,11 @@
 !WindowGroup class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.340 2015-03-26 17:38:46 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.341 2015-04-30 17:31:38 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.340 2015-03-26 17:38:46 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.341 2015-04-30 17:31:38 cg Exp $'
 ! !