A super-nasty Win32 workaround in DeviceGraphicsContext jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 19 Feb 2016 06:48:34 +0000
branchjv
changeset 7149 eb604cc734e9
parent 7148 00fade82bf90
child 7152 e63bbf5eefa6
A super-nasty Win32 workaround in DeviceGraphicsContext For yet unknown reason, it (seems) to happen that a view is #destroy'd and jight after an expose event is processed, which results in drawing to a closed drawable. The `Delay waitForMilliseconds:1` for an unknown reason helps. This is a super-nasty hack and needs to be investihated further.
DeviceGraphicsContext.st
--- a/DeviceGraphicsContext.st	Wed Feb 17 07:04:15 2016 +0100
+++ b/DeviceGraphicsContext.st	Fri Feb 19 06:48:34 2016 +0000
@@ -3717,6 +3717,9 @@
     id notNil ifTrue:[
         self changed:#aboutToDestroy.
         drawableId := nil.
+        OperatingSystem isMSWINDOWSlike ifTrue:[
+            Delay waitForMilliseconds: 1.
+        ].
         drawableType == #window ifTrue:[
             device destroyView:nil withId:id.
         ] ifFalse:[