Don't show the window until it's configured
On OSX, the window was being shown as soon as it was created, before
adding views, adjusting its position, etc. Crucially, this is before
SDL has set up the internal state it needs to draw to the window.
When adjusting the window position, if the new position is not on the
default display, the NSWindow will attempt to redraw (since it had to
reallocate resources and lost any prior image). SDL crashes when this
happens because it still only has partial state.
This change defers showing the window until it's configured and all
the necessary state has been set up. The calls to show the window at
the right time were already there, just redundant.
Bug: 40556
Change-Id: I272a12f260bd71d271a03a0f74b698ecc5e498f3
1 file changed