Frank Shearar uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-fbs.277.mcz ==================== Summary ==================== Name: Graphics-fbs.277 Author: fbs Time: 1 November 2013, 9:02:17.694 am UUID: fbf825b5-7f97-9c48-9a35-93c4f1a1b1f4 Ancestors: Graphics-nice.276 Defer display depth changes to the current UIManager. (Remove the one-shot workarounds in the pre/postambles, as per Nicolas Cellier's suggestion.) =============== Diff against Graphics-nice.276 =============== Item was removed: - (PackageInfo named: 'Graphics') preamble: '"below, add code to be run before the loading of this package" - - "Remember which windows were not collapsed, and collapse them. - The goal is to freeze text morph display during this update. - This is required because displaying may fail and let the system in unusable state." - (Smalltalk globals - at: #''_windows_which_were_not_collapsed'' - put: (World submorphsSatisfying: [:e | (e isKindOf: SystemWindow) - and: [e isCollapsed not]])) - do: [:e | e collapse]. - '! Item was changed: ----- Method: DisplayScreen>>newDepthNoRestore: (in category 'private') ----- newDepthNoRestore: pixelSize + UIManager default newDisplayDepthNoRestore: pixelSize.! - "Change depths. Check if there is enough space!! , di" - | area need | - pixelSize = depth ifTrue: [^ self "no change"]. - pixelSize abs < self depth ifFalse: - ["Make sure there is enough space" - area := Display boundingBox area. "pixels" - Smalltalk isMorphic ifFalse: - [ScheduledControllers scheduledWindowControllers do: - [:aController | "This should be refined..." - aController view cacheBitsAsTwoTone ifFalse: - [area := area + aController view windowBox area]]]. - 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']]. - self setExtent: self extent depth: pixelSize. - Smalltalk isMorphic ifFalse: [ScheduledControllers updateGray]. - DisplayScreen startUp! Item was changed: ----- Method: DisplayScreen>>restore (in category 'other') ----- restore + UIManager default restoreDisplay.! - "Restore the bits on Display" - Project current ifNotNil:[:p| p invalidate; restore].! Item was changed: ----- Method: DisplayScreen>>restoreAfter: (in category 'other') ----- restoreAfter: aBlock + UIManager default restoreDisplayAfter: aBlock.! - "Evaluate the block, wait for a mouse click, and then restore the screen." - - aBlock value. - Sensor waitButton. - self restore.! Item was removed: - (PackageInfo named: 'Graphics') postscript: '"below, add code to be run after the loading of this package" - - "Restore the collapsed window that were not" - (Smalltalk globals removeKey: #''_windows_which_were_not_collapsed'') - reverseDo: [:e | e expand].'! |
Free forum by Nabble | Edit this page |