Skip to content

Lay out the world as soon as its content is added - #1999

Open
demarey wants to merge 1 commit into
pharo-spec:Pharo15from
demarey:fix-world-layout
Open

demarey wants to merge 1 commit into
pharo-spec:Pharo15from
demarey:fix-world-layout

Conversation

@demarey

@demarey demarey commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

SpMorphicWorldAdapter adds the content of the presenter to the world with a proportional layout frame (SpAbstractMorphicWindowAdapter>>#add:toWindow:), but the Morphic display cycle does not lay out the world itself: only an event does (e.g. the mouse entering the window). Until then, the content keeps its default extent and does not fill the window.

Seen with an application opened as the world (SpWorldPresenter) in a deployed image: during its first seconds, or until the mouse enters the window, the application was displayed at the default extent of its presenter, in the top left corner of a bigger window.

Change: SpMorphicWorldAdapter>>#add:toWindow: lays out the world (fullBounds) once the content is added.

Added SpMorphicWorldAdapterTest>>#testContentFillsTheWorldWhenAdded: it fails without the fix (the content stays at 50@40) and passes with it. Spec2-Adapters-Morphic-Tests show no other change in a Pharo 15 image.

SpMorphicWorldAdapter adds the content of the presenter to the world with a
proportional layout frame, but the Morphic display cycle does not lay out the
world itself: until an event lays it out (e.g. the mouse entering the window),
the content keeps its default extent and does not fill the window.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant