flush device fonts early; allow selective flushing; catch errors during reinitialize of views
--- a/DevWorkst.st Wed Feb 07 16:16:02 1996 +0100
+++ b/DevWorkst.st Wed Feb 07 16:18:15 1996 +0100
@@ -2747,6 +2747,8 @@
|prevKnownViews prevMapping|
+ Font flushDeviceFontsFor:self.
+
displayId := nil.
dispatching := false.
dispatchProcess := nil.
@@ -2787,7 +2789,9 @@
prevKnownViews do:[:aView |
aView notNil ifTrue:[
"have to re-create the view"
- aView reinitialize
+ AbortSignal catch:[
+ aView reinitialize
+ ]
]
].
"
@@ -3728,6 +3732,6 @@
!DeviceWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Attic/DevWorkst.st,v 1.68 1996-02-06 00:26:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Attic/DevWorkst.st,v 1.69 1996-02-07 15:18:15 cg Exp $'
! !
DeviceWorkstation initialize!
--- a/DeviceWorkstation.st Wed Feb 07 16:16:02 1996 +0100
+++ b/DeviceWorkstation.st Wed Feb 07 16:18:15 1996 +0100
@@ -2747,6 +2747,8 @@
|prevKnownViews prevMapping|
+ Font flushDeviceFontsFor:self.
+
displayId := nil.
dispatching := false.
dispatchProcess := nil.
@@ -2787,7 +2789,9 @@
prevKnownViews do:[:aView |
aView notNil ifTrue:[
"have to re-create the view"
- aView reinitialize
+ AbortSignal catch:[
+ aView reinitialize
+ ]
]
].
"
@@ -3728,6 +3732,6 @@
!DeviceWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.68 1996-02-06 00:26:22 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.69 1996-02-07 15:18:15 cg Exp $'
! !
DeviceWorkstation initialize!
--- a/Font.st Wed Feb 07 16:16:02 1996 +0100
+++ b/Font.st Wed Feb 07 16:18:15 1996 +0100
@@ -36,7 +36,7 @@
!
version
- ^ '$Header: /cvs/stx/stx/libview/Font.st,v 1.27 1995-12-26 18:18:24 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Font.st,v 1.28 1996-02-07 15:18:11 cg Exp $'
!
documentation
@@ -146,23 +146,26 @@
]
!
-flushDeviceFonts
- "unassign all fonts from their device"
+flushDeviceFontsFor:aDevice
+ "unassign all fonts from their device if they are assigned
+ to aDevice"
Lobby do:[:aFont |
- aFont restored.
- Lobby registerChange:aFont
+ (aDevice isNil or:[aFont device == aDevice]) ifTrue:[
+ aFont restored.
+ Lobby registerChange:aFont
+ ]
]
!
update:something
- (something == #restarted) ifTrue:[
+ (something == #earlyRestart) ifTrue:[
"
this is sent by ObjectMemory when restarting from
an image. All device specific information (especially device
handles) are now invalid and have to be flushed
"
- self flushDeviceFonts
+ self flushDeviceFontsFor:nil
]
! !