Related issue: https://pharo.fogbugz.com/f/cases/20094/Headless-mode-breaks-image When the image is saved in headless mode, the window size is set to extension 10@10. This value is too small. see opensmalltalk-vm/platforms/Mac OS/vm/Developer/sqMacMinimal.c, line 531 — |
Hey @pavel-krivanek, if you reference the fogbugz site, please at least include the gist of its discussion here. Fogbugz is a closed site and not everybody has an account there.,= Also, can you tell why — |
In reply to this post by David T Lewis
The issue was described with this code curl get.pharo.org/60+vm | bash
./pharo Pharo.image save 1.image
./pharo-ui 1.image When you did it, the Pharo started but no UI was shown. Then we realized that the UI actually started and the window was opened but it was so small that it was hard to notice. — |
hi Pavel. this is not a bug in the vm. it's the images responsibility to set the correct size before saving. -- Sent from a mobile device |
In reply to this post by David T Lewis
I'm pretty sure it is a VM problem. For example on Linux it works as expected (which kind of supports that it is VM related). Mac does not take the display size from the Display but from the window, see the related method: int ioScreenSize(void) {
/* return the screen size as two positive 16-bit integers packed into a 32-bit integer */
int w = 10, h = 10;
if (stWindow != nil) {
w = stWindow->portRect.right - stWindow->portRect.left;
h = stWindow->portRect.bottom - stWindow->portRect.top;
}
return (w << 16) | (h & 0xFFFF); /* w is high 16 bits; h is low 16 bits */
} — |
In reply to this post by David T Lewis
(note that — |
In reply to this post by David T Lewis
Ok, here's the roundup:
Nothing of this is consistent. The most common thing is to return the saved size or The only thing to fix that here is to actually make the Cocoa VM query the image for its saved size, yes. — |
In reply to this post by David T Lewis
Thank you for the analysis. I will close that PR — |
In reply to this post by David T Lewis
I've argued for a long time - probably decades by now - that the VM should not be opening a window until and unless the image requests one. On RISC OS no window is even created, let alone opened until the first call to display the screen bitmap. It makes headless a trivial choice of the image setting. I know that at one time, Windows had to have a window of sorts in order for moust(etc) events to be dealt with and other important stuff, but surely that stage is long gone. Remembering the window size and default opening the window is an artefact of ancient code that simply has no sensible place in today's Smalltalk. tim -- tim Rowledge; [hidden email]; http://www.rowledge.org/tim Oxymorons: Good grief |
In reply to this post by David T Lewis
— |
Free forum by Nabble | Edit this page |