<p>Ok, here's the roundup:</p>
<ol>
<li>
<p>Mac: seems to has ever used 10@10 as fallback, apparently since the 1990s (<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a8a1dc1e33267e0fa2dab22959e41d0a072420d9/platforms/iOS/vm/Common/Classes/sqSqueakNullScreenAndWindow.m#L70">fallback still</a> )<br>
But sometimes returns <code>16@16</code> <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a8a1dc1e33267e0fa2dab22959e41d0a072420d9/platforms/iOS/vm/OSX/sqSqueakMainApplication%2Bscreen.m#L52">when headless is detected</a></p>
</li>
<li>
<p>Windows:</p>
<ul>
<li>Tries window's size, if window is there</li>
<li><a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/e2fa2d10b4e85f1fae03f4e759527eb8e1742385/platforms/win32/vm/sqWin32Window.c#L1752">Tries saved size (which comes from image)</a><br>
<em>However</em>, when setting the window size, it</li>
<li><a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/e2fa2d10b4e85f1fae03f4e759527eb8e1742385/platforms/win32/vm/sqWin32Window.c#L997">Avoids doing that in headless mode</a></li>
<li><a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/e2fa2d10b4e85f1fae03f4e759527eb8e1742385/platforms/win32/vm/sqWin32Window.c#L1000">Tries saved size (which comes from vm)</a>,</li>
<li><a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/e2fa2d10b4e85f1fae03f4e759527eb8e1742385/platforms/win32/vm/sqWin32Window.c#L1000">Uses default of <code>640@480</code> (aka VGA)</a></li>
<li><a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/e2fa2d10b4e85f1fae03f4e759527eb8e1742385/platforms/win32/vm/sqWin32Window.c#L1007">but makes sure that it's at least <code>64@64</code></a></li>
</ul>
<p>Which means that one call to <code>SetWindowSize</code> makes everything even more inconsistent</p>
</li>
<li>
<p>Unix: First note: reading the Screen size actually <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a8a1dc1e33267e0fa2dab22959e41d0a072420d9/platforms/unix/vm-display-X11/sqUnixX11.c#L4956"><em>can change the physical screen size</em></a></p>
<ul>
<li><a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a8a1dc1e33267e0fa2dab22959e41d0a072420d9/platforms/unix/vm-display-X11/sqUnixX11.c#L4935">Starts from the images saved size (which comes from image)</a></li>
<li><a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a8a1dc1e33267e0fa2dab22959e41d0a072420d9/platforms/unix/vm-display-X11/sqUnixX11.c#L4937">In headless, gives that saved size</a> or, if that is not available, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a8a1dc1e33267e0fa2dab22959e41d0a072420d9/platforms/unix/vm-display-X11/sqUnixX11.c#L4938">just <code>64@64</code></a></li>
<li>Only then, after possible resizing of the physical window, the <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a8a1dc1e33267e0fa2dab22959e41d0a072420d9/platforms/unix/vm-display-X11/sqUnixX11.c#L4956">actual size is determined</a></li>
</ul>
</li>
</ol>
<hr>
<p><em>Nothing</em> of this is consistent. The most common thing is to return the saved size or <code>64@64</code>.</p>
<p>The only thing to fix that here is to actually make the Cocoa VM query the image for its saved size, yes.<br>
But save for that, I would avoid hardcoding like <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="367133574" data-permission-text="Issue title is private" data-url="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/289" data-hovercard-type="pull_request" data-hovercard-url="/OpenSmalltalk/opensmalltalk-vm/pull/289/hovercard" href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/289">#289</a> .</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you commented.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/288#issuecomment-427338917">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AhLyWzL0eUKJthIwvrFpdhFunr9wDMJdks5uh0d7gaJpZM4XJ3vl">mute the thread</a>.<img src="https://github.com/notifications/beacon/AhLyW9iCe8MAjvUD5et-gu3ezcbwJDWrks5uh0d7gaJpZM4XJ3vl.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@krono in #288: Ok, here's the roundup:\r\n\r\n 1. Mac: seems to has ever used 10@10 as fallback, apparently since the 1990s ([fallback still](https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a8a1dc1e33267e0fa2dab22959e41d0a072420d9/platforms/iOS/vm/Common/Classes/sqSqueakNullScreenAndWindow.m#L70) ) \r\n    But sometimes returns `16@16` [when headless is detected](https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a8a1dc1e33267e0fa2dab22959e41d0a072420d9/platforms/iOS/vm/OSX/sqSqueakMainApplication%2Bscreen.m#L52)\r\n\r\n 2. Windows: \r\n     - Tries window's size, if window is there\r\n     - [Tries saved size (which comes from image)](https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/e2fa2d10b4e85f1fae03f4e759527eb8e1742385/platforms/win32/vm/sqWin32Window.c#L1752)\r\n    _However_, when setting the window size, it \r\n     - [Avoids doing that in headless mode](https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/e2fa2d10b4e85f1fae03f4e759527eb8e1742385/platforms/win32/vm/sqWin32Window.c#L997)     \r\n     - [Tries saved size (which comes from vm)](https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/e2fa2d10b4e85f1fae03f4e759527eb8e1742385/platforms/win32/vm/sqWin32Window.c#L1000),\r\n     - [Uses default of `640@480` (aka VGA)](https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/e2fa2d10b4e85f1fae03f4e759527eb8e1742385/platforms/win32/vm/sqWin32Window.c#L1000)\r\n     - [but makes sure that it's at least `64@64`](https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/e2fa2d10b4e85f1fae03f4e759527eb8e1742385/platforms/win32/vm/sqWin32Window.c#L1007)\r\n\r\n    Which means that one call to `SetWindowSize` makes everything even more inconsistent\r\n \r\n 3. Unix: First note: reading the Screen size actually [_can change the physical screen size_](https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a8a1dc1e33267e0fa2dab22959e41d0a072420d9/platforms/unix/vm-display-X11/sqUnixX11.c#L4956)\r\n    - [Starts from the images saved size (which comes from image)](https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a8a1dc1e33267e0fa2dab22959e41d0a072420d9/platforms/unix/vm-display-X11/sqUnixX11.c#L4935)\r\n    - [In headless, gives that saved size](https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a8a1dc1e33267e0fa2dab22959e41d0a072420d9/platforms/unix/vm-display-X11/sqUnixX11.c#L4937) or, if that is not available, [just `64@64`](https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a8a1dc1e33267e0fa2dab22959e41d0a072420d9/platforms/unix/vm-display-X11/sqUnixX11.c#L4938)\r\n     - Only then, after possible resizing of the physical window, the [actual size is determined](https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/a8a1dc1e33267e0fa2dab22959e41d0a072420d9/platforms/unix/vm-display-X11/sqUnixX11.c#L4956)\r\n\r\n----- \r\n\r\n_Nothing_ of this is consistent. The most common thing is to return the saved size or `64@64`.\r\n\r\nThe only thing to fix that here is to actually make the Cocoa VM query the image for its saved size, yes.\r\nBut save for that, I would avoid hardcoding like #289 .\r\n\r\n\r\n"}],"action":{"name":"View Issue","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/288#issuecomment-427338917"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/288#issuecomment-427338917",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/288#issuecomment-427338917",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Re: [OpenSmalltalk/opensmalltalk-vm] Fallback window size on Mac is too small (#288)",
"sections": [
{
"text": "",
"activityTitle": "**Tobias Pape**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@krono",
"facts": [

]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 288,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close issue",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueClose\",\n\"repositoryFullName\": \"OpenSmalltalk/opensmalltalk-vm\",\n\"issueId\": 288\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/288#issuecomment-427338917"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 388463589\n}"
}
],
"themeColor": "26292E"
}
]</script>