Fixed incorrect window state if the window is created grabbed.  We don't want to activate the window if it isn't shown yet.
Unify the SetWindowPos() calls so that they all set the window state based on SDL state.
This prevents a rogue call to SetWindowPos() from changing the state unexpectedly.
Also moved the size correction code above the window position query, because the initial window size can affect the positioning.