--- a/Color.st Wed Aug 18 19:48:05 1999 +0200
+++ b/Color.st Wed Aug 18 19:59:47 1999 +0200
@@ -560,10 +560,6 @@
update:something with:aParameter from:changedObject
"handle image restarts and flush any device resource handles"
- (something == #restarted) ifTrue:[
- self flushDeviceColors
- ].
-
(something == #returnFromSnapshot) ifTrue:[
Display visualType == #TrueColor ifTrue:[
Display releaseFixColors
@@ -4280,15 +4276,18 @@
!Color methodsFor:'instance release'!
-shallowCopyForFinalization
+executor
"redefined, since for finalization only device and colorIndex
are needed - thus a faster copy is possible here"
- |aCopy|
-
- aCopy := DeviceColorHandle basicNew.
- aCopy setDevice:device colorId:colorId.
- ^ aCopy
+ ^ DeviceColorHandle basicNew setDevice:device colorId:colorId
+!
+
+releaseFromDevice
+ "I am no longer available on the device"
+
+ colorId := device := nil.
+
! !
!Color methodsFor:'printing & storing'!
@@ -4605,6 +4604,6 @@
!Color class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.129 1999-08-18 17:23:07 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.130 1999-08-18 17:59:20 cg Exp $'
! !
Color initialize!
--- a/Cursor.st Wed Aug 18 19:48:05 1999 +0200
+++ b/Cursor.st Wed Aug 18 19:59:47 1999 +0200
@@ -355,30 +355,14 @@
!Cursor class methodsFor:'initialization'!
-flushDeviceCursors
+flushDeviceCursorsFor:aDevice
"unassign all cursors from their device"
- DeviceWorkstation allScreens do:[:aDevice |
- aDevice releaseDeviceCursors
+ aDevice deviceCursors do:[:aCursor |
+ aCursor setDevice:nil id:nil
].
-
-"/ Lobby notNil ifTrue:[
-"/ Lobby do:[:aCursor |
-"/ aCursor restored.
-"/ Lobby registerChange:aCursor
-"/ ]
-"/ ]
-!
-
-initialize
-"/ Lobby isNil ifTrue:[
-"/ Lobby := Registry new.
-"/ ].
-
- "want to be informed when returning from snapshot"
- ObjectMemory addDependent:self.
-
- "Modified: / 28.4.1999 / 15:14:14 / cg"
+ aDevice releaseDeviceCursors
+
!
initializeNewCursors
@@ -1580,16 +1564,6 @@
"
"Modified: / 30.4.1999 / 01:31:51 / cg"
-!
-
-update:something with:aParameter from:changedObject
- "sent when restarted after a snapIn"
-
- (something == #restarted) ifTrue:[
- self flushDeviceCursors
- ]
-
- "Created: 15.6.1996 / 15:18:47 / cg"
! !
!Cursor class methodsFor:'instance creation'!
@@ -2764,6 +2738,12 @@
^ self class basicNew setDevice:device id:cursorId
"Modified: 20.4.1996 / 23:23:19 / cg"
+!
+
+releaseFromDevice
+ "I am no longer available on the device"
+
+ cursorId := device := nil.
! !
!Cursor methodsFor:'private'!
@@ -2896,6 +2876,5 @@
!Cursor class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Cursor.st,v 1.73 1999-08-18 17:48:05 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Cursor.st,v 1.74 1999-08-18 17:59:47 cg Exp $'
! !
-Cursor initialize!
--- a/DevWorkst.st Wed Aug 18 19:48:05 1999 +0200
+++ b/DevWorkst.st Wed Aug 18 19:59:47 1999 +0200
@@ -4638,6 +4638,10 @@
|prevKnownViews prevMapping prevWidth prevHeight|
Font flushDeviceFontsFor:self.
+ self releaseDeviceCursors.
+ self releaseDeviceColors.
+
+"/ Color flushDeviceColorsFor:self.
displayId := nil.
dispatching := false.
@@ -6459,6 +6463,6 @@
!DeviceWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Attic/DevWorkst.st,v 1.312 1999-08-18 17:23:52 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Attic/DevWorkst.st,v 1.313 1999-08-18 17:59:33 cg Exp $'
! !
DeviceWorkstation initialize!
--- a/DeviceWorkstation.st Wed Aug 18 19:48:05 1999 +0200
+++ b/DeviceWorkstation.st Wed Aug 18 19:59:47 1999 +0200
@@ -4638,6 +4638,10 @@
|prevKnownViews prevMapping prevWidth prevHeight|
Font flushDeviceFontsFor:self.
+ self releaseDeviceCursors.
+ self releaseDeviceColors.
+
+"/ Color flushDeviceColorsFor:self.
displayId := nil.
dispatching := false.
@@ -6459,6 +6463,6 @@
!DeviceWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.312 1999-08-18 17:23:52 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.313 1999-08-18 17:59:33 cg Exp $'
! !
DeviceWorkstation initialize!
--- a/HostGraphicsDevice.st Wed Aug 18 19:48:05 1999 +0200
+++ b/HostGraphicsDevice.st Wed Aug 18 19:59:47 1999 +0200
@@ -152,7 +152,7 @@
releaseDeviceColors
deviceColors do:[:aColor |
- aColor setDevice:nil colorId:nil
+ aColor releaseFromDevice
].
deviceColors := Registry new.
@@ -161,8 +161,8 @@
!
releaseDeviceCursors
- deviceCursors do:[:aCursor |
- aCursor setDevice:nil id:nil
+ deviceCursors deviceCursors do:[:aCursor |
+ aCursor releaseFromDevice
].
deviceCursors := Registry new.
@@ -177,5 +177,5 @@
!HostGraphicsDevice class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/HostGraphicsDevice.st,v 1.10 1999-08-18 17:24:00 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/HostGraphicsDevice.st,v 1.11 1999-08-18 17:58:58 cg Exp $'
! !