[PATCH] notepad: Use the default window position and size.

z.figura12 at gmail.com z.figura12 at gmail.com
Sat Jul 8 12:02:11 CDT 2017


On 07/08/2017 05:12 AM, Henri Verbeet wrote:
> On 8 July 2017 at 01:58, Zebediah Figura <zfigura at 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.

In either case we need to fix the saved position; it doesn't seem to be 
getting updated.



More information about the wine-devel mailing list