DeviceWorkstation.st
changeset 2837 93962b39371c
parent 2826 d41820391aec
child 2838 42f108671347
--- a/DeviceWorkstation.st	Wed Aug 18 18:41:46 1999 +0200
+++ b/DeviceWorkstation.st	Wed Aug 18 18:42:22 1999 +0200
@@ -4720,23 +4720,30 @@
 !
 
 releaseDeviceResources
-    "release any cached device resources"
-
-    blackColor notNil ifTrue:[
-	blackColor on:nil. 
-	blackColor := nil.
-    ].
-    whiteColor notNil ifTrue:[
-	whiteColor on:nil.
-	whiteColor := nil.
-    ].
+    "release any cached device resources.
+     This is invoked when closed or when the display connection is broken
+     (i.e. be prepared to not be able to release resources regularily)"
+
+"/    blackColor notNil ifTrue:[
+"/        blackColor on:nil. 
+"/    ].
+"/    whiteColor notNil ifTrue:[
+"/        whiteColor on:nil.
+"/    ].
+
+    blackColor := whiteColor := nil.
 
     Image releaseResourcesOnDevice:self.
-    Color releaseResourcesOnDevice:self.
+    self releaseDeviceColors.
     Cursor releaseResourcesOnDevice:self.
     Font releaseResourcesOnDevice:self.
     DeviceGraphicsContext releaseResourcesOnDevice:self.
 
+    focusView := activeView := rootView := lastView := nil.
+    activeKeyboardGrab := activePointerGrab := nil.
+
+    AllScreens remove:self ifAbsent:nil.
+
     "Modified: 16.1.1997 / 19:34:11 / cg"
 ! !
 
@@ -6448,6 +6455,6 @@
 !DeviceWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.309 1999-08-18 09:41:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.310 1999-08-18 16:42:22 cg Exp $'
 ! !
 DeviceWorkstation initialize!