Mantis - Squeak
Viewing Issue Advanced Details
4834 Kernel minor always 09-09-06 17:50 09-09-06 17:50
Krivanek  
 
normal  
new 3.10  
open  
none    
none  
0004834: [KernelImageOverride] DisplayScreen newDepthNoRestore:
DisplayScreen >> newDepthNoRestore:

original:

newDepthNoRestore: 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

override:

newDepthNoRestore: pixelSize
    
    UIManager default newDisplayDepthNoRestore: pixelSize

UI dependent code replaced with the new UIManager message

There are no notes attached to this issue.