Do not restore views that have been closed whlie being invisible.
authorStefan Vogel <sv@exept.de>
Thu, 22 Mar 2001 16:56:04 +0100
changeset 1462 b7ffa1109142
parent 1461 f3ad0001d240
child 1463 df2fec4aad9c
Do not restore views that have been closed whlie being invisible. (Problems with SMC::SMCTapeBackup finished while being locked).
ScreenLock.st
--- a/ScreenLock.st	Tue Mar 06 13:42:04 2001 +0100
+++ b/ScreenLock.st	Thu Mar 22 16:56:04 2001 +0100
@@ -88,12 +88,14 @@
 lockAfterSeconds
     "return the value of the instance variable 'lockAfterSeconds' (automatically generated)"
 
-    ^ lockAfterSeconds!
+    ^ lockAfterSeconds
+!
 
 lockAfterSeconds:something
     "set the value of the instance variable 'lockAfterSeconds' (automatically generated)"
 
-    lockAfterSeconds := something.!
+    lockAfterSeconds := something.
+!
 
 lockChannel
 
@@ -124,27 +126,32 @@
 lockChannelOut:something
     "set the value of the instance variable 'lockChannelOut' (automatically generated)"
 
-    lockChannelOut := something.!
+    lockChannelOut := something.
+!
 
 processor
     "return the value of the instance variable 'processor' (automatically generated)"
 
-    ^ processor!
+    ^ processor
+!
 
 processor:something
     "set the value of the instance variable 'processor' (automatically generated)"
 
-    processor := something.!
+    processor := something.
+!
 
 workstation
     "return the value of the instance variable 'workstation' (automatically generated)"
 
-    ^ workstation!
+    ^ workstation
+!
 
 workstation:something
     "set the value of the instance variable 'workstation' (automatically generated)"
 
-    workstation := something.! !
+    workstation := something.
+! !
 
 !ScreenLock methodsFor:'change & update'!
 
@@ -283,10 +290,15 @@
 
     lockedViews := workstation allViews.
     hiddenViews := lockedViews select:[:v|
-        v shown and:[
-            v isPopUpView ifTrue:[v hide].
-            v isTopView.
+        "close popupViews, they will leave the modal loop when 
+         they are unmapped.
+         This is a kludge, but invisible popUpViews are 
+         currently not supported"
+
+        v isPopUpView ifTrue:[
+            v hide.
         ].
+        v shown and:[v isTopView].
     ].
 
     hiddenViews do:[:v|
@@ -296,21 +308,23 @@
     lockChannelOut notNil ifTrue:[      
         lockChannelOut value:true.
     ].
-
 !
 
 unlockScreen
 
     lastInactiveTime := nil.
     hiddenViews do:[:v|
-        v beVisible.
+        "don't try to restore views that have been closed while
+         being invisible"
+        v id notNil ifTrue:[
+            v beVisible.
+        ].
     ].
     hiddenViews := lockedViews := nil.
 
     lockChannelOut notNil ifTrue:[      
         lockChannelOut value:false.
     ].
-
 ! !
 
 !ScreenLock methodsFor:'queries'!
@@ -323,5 +337,5 @@
 !ScreenLock class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/ScreenLock.st,v 1.5 2000-10-02 14:47:03 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/ScreenLock.st,v 1.6 2001-03-22 15:56:04 stefan Exp $'
 ! !