On 08.07.2017 20:02, z.figura12@gmail.com wrote:
On 07/08/2017 05:12 AM, Henri Verbeet wrote:
On 8 July 2017 at 01:58, Zebediah Figura zfigura@codeweavers.com wrote:
@@ -775,17 +774,9 @@ int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show) info.cbSize = sizeof(info); GetMonitorInfoW( monitor, &info );
- x = main_rect.left;
- y = main_rect.top;
- if (main_rect.left >= info.rcWork.right ||
main_rect.top >= info.rcWork.bottom ||
main_rect.right < info.rcWork.left ||
main_rect.bottom < info.rcWork.top)
x = y = CW_USEDEFAULT;
Globals.hMainWnd =
CreateWindowW(className, winName, WS_OVERLAPPEDWINDOW, x, y,
main_rect.right - main_rect.left,
main_rect.bottom - main_rect.top,
CreateWindowW(className, winName, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, NULL, NULL, Globals.hInstance, NULL); if (!Globals.hMainWnd) {
Why would you want to do that? But if we're going to ignore it, we probably shouldn't bother saving and loading the window position to/from the registry either.
Hmm, checking on XP shows that our current behaviour is correct, but I thought I recalled while checking on Win7 that the latter always used the default size. I may be misremembering, though.
I don't see default size on Win7, both position and size look preserved from last run.
In either case we need to fix the saved position; it doesn't seem to be getting updated.