Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.333.mcz==================== Summary ====================
Name: Graphics-mt.333
Author: mt
Time: 9 May 2016, 1:43:37.904729 pm
UUID: befff4cc-9751-c34a-9458-cd9dba089632
Ancestors: Graphics-mt.332
Update according to the projects refactoring in System-mt.827
=============== Diff against Graphics-mt.332 ===============
Item was changed:
----- Method: DisplayScreen class>>checkForNewScreenSize (in category 'display box access') -----
checkForNewScreenSize
"Check whether the screen size has changed and if so take appropriate actions"
+ Display extent = DisplayScreen actualScreenSize
+ ifFalse: [Display restore].!
- Display extent = DisplayScreen actualScreenSize ifTrue: [^ self].
- DisplayScreen startUp.
- Project current ifNotNil:[:p| p displaySizeChanged].!
Item was changed:
----- Method: DisplayScreen>>newDepth: (in category 'other') -----
newDepth: pixelSize
"
Display newDepth: 8.
Display newDepth: 1.
"
+ | area need |
+
(self supportsDisplayDepth: pixelSize)
ifFalse:[^self inform:'Display depth ', pixelSize printString, ' is not supported on this system'].
+
+ pixelSize = self depth ifTrue: [^ self "no change"].
+ pixelSize abs < self depth ifFalse:
+ ["Make sure there is enough space"
+ area := self boundingBox area. "pixels"
+
+ need := (area * (pixelSize abs - self depth) // 8) "new bytes needed"
+ + Smalltalk lowSpaceThreshold.
+ (Smalltalk garbageCollectMost <= need
+ and: [Smalltalk garbageCollect <= need])
+ ifTrue: [self error: 'Insufficient free space']].
+
+ Display setExtent: Display extent depth: pixelSize.
+ Display beDisplay.
+
+ Project current ifNotNil: [:p |
+ p
+ displayDepthChanged;
+ displaySizeChanged].!
- self newDepthNoRestore: pixelSize.
- self restore.!
Item was removed:
- ----- Method: DisplayScreen>>newDepthNoRestore: (in category 'private') -----
- newDepthNoRestore: pixelSize
- UIManager default newDisplayDepthNoRestore: pixelSize.!
Item was changed:
----- Method: DisplayScreen>>restore (in category 'other') -----
restore
+
+ DisplayScreen startUp.
+ Project current ifNotNil: [:p| p displaySizeChanged].!
- UIManager default restoreDisplay.!
Item was changed:
----- Method: DisplayScreen>>restoreAfter: (in category 'other') -----
restoreAfter: aBlock
+ "Evaluate the block, wait for a mouse click, and then restore the screen."
+
+ aBlock ensure: [
+ Sensor waitButton.
+ self restore].!
- UIManager default restoreDisplayAfter: aBlock.!