Inform GC (DeviceGraphicsContext) when it's size has chaged jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 17 Jul 2018 08:03:06 +0200
branchjv
changeset 8429 e47f76ecf0d2
parent 8427 396e99a3931b
child 8452 6336f75507a0
Inform GC (DeviceGraphicsContext) when it's size has chaged This has been added in 1b427e95d77c but somehow got lost (bad merge, perhaps)
SimpleView.st
--- a/SimpleView.st	Mon Jul 16 12:01:05 2018 +0200
+++ b/SimpleView.st	Tue Jul 17 08:03:06 2018 +0200
@@ -1822,6 +1822,7 @@
     "Created: / 13.2.1999 / 10:31:39 / cg"
 ! !
 
+
 !SimpleView methodsFor:'accessing-behavior'!
 
 disable
@@ -8370,6 +8371,7 @@
     ^ aMenu startUpFor:self
 ! !
 
+
 !SimpleView methodsFor:'native widget support'!
 
 nativeWindowType
@@ -8795,6 +8797,13 @@
                                            width:width height:height.
         ].
 
+        "Have to tell graphics context when extent has changed.
+         Some graphics context implementations need that (Cairo, for
+         instance"
+        ((width ~~ oldWidth) or:[height ~~ oldHeight]) ifTrue:[
+            gc width:width height:height.
+        ].
+
         "if view becomes bigger, send sizeChanged after"
         "no longer"
         false "(how ~~ #smaller)" ifTrue:[
@@ -8860,7 +8869,8 @@
         dependents notNil ifTrue:[ self changed:#origin ].
     ].
 
-    "Modified: / 25.5.1999 / 14:49:56 / cg"
+    "Modified: / 25-05-1999 / 14:49:56 / cg"
+    "Modified: / 17-07-2018 / 07:56:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 pointFromRelative:p
@@ -10719,6 +10729,7 @@
     ^ self
 ! !
 
+
 !SimpleView methodsFor:'scrolling'!
 
 halfPageDown