If OWLMaker is started from a shortcut, or from Windows Explorer, it does not start maximized if it was maximized before closing. The non-maximized main window size is restored correctly.
The problem is that when the application is started from a shortcut or Explorer, apparently the passed flag is SW_SHOWNORMAL and not SW_SHOWDEFAULT, and we are restoring the last window state only on SW_SHOWDEFAULT.
Fix in [r6794]
Related
Commit: [r6794]
Good to have maximised state restored since last use, but does this change not mean that you now cannot start OWLMaker in a way that guarantees that it will start in normal state (not maximised)? I figure this was the reason for restoring the maximised state only when SW_SHOWDEFAULT is passed.
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow
Is there a way to tell a shortcut to use SW_SHOWDEFAULT? Then we could leave the code as it was, respecting SW_SHOWNORMAL. Alas, you can only choose Maximised, Minimised or Normal for how to run the application from a shortcut. Default is not an option. So your fix might be the best we can do.
Last edit: Vidar Hasfjord 2024-02-23
If you don't want it to start maximized, then don't have it maximized when you close it :-)
Also, while for the shortcut case you have at least some control over the startup state - you can force it to be always maximized, but when you start it from Explorer you don't have such options, and I think that fully restoring the last state is the best behavior.
@jogybl wrote:
Yes, agree. It is a shame that Explorer tries to dictate SW_SHOWNORMAL. It should have used SW_SHOWDEFAULT, I suppose, and let the application make the decision.