extensions.st
changeset 72 3eabcca278cd
parent 69 e05fa6c6fdf1
child 81 094b29cf4c2c
--- a/extensions.st	Mon Mar 28 00:19:56 2016 +0100
+++ b/extensions.st	Fri Mar 25 22:05:01 2016 +0000
@@ -131,15 +131,22 @@
         ^ surface
     ].
     device isWindowsPlatform ifTrue:[ 
+        | view |
+
+        drawableType == #window ifTrue:[
+            view := device viewFromId:drawableId.
+        ].
         gcId isNil ifTrue:[ 
             self initGC
         ].
-        surface := Cairo::Surface newWin32WithHDC: (device hdcForGC: gcId).
+        surface := Cairo::Surface newWin32WithDC: (device dcLockForGC: gcId).
+        surface setView: view.
         ^ surface
     ].
     self error: '(Yet) unsupported device type'
 
     "Modified: / 25-02-2016 / 11:13:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (format): / 29-03-2016 / 23:56:46 / jv"
 ! !
 
 !DeviceGraphicsContext methodsFor:'cairo support'!