user32: DefWindowProc(WM_NCCALCSIZE) should return 0.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37609 Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d65e280751
commit
7d2abd5912
|
@ -168,7 +168,7 @@ extern void MENU_EndMenu(HWND) DECLSPEC_HIDDEN;
|
|||
/* nonclient area */
|
||||
extern LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip) DECLSPEC_HIDDEN;
|
||||
extern LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
|
||||
extern LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wParam, RECT *winRect ) DECLSPEC_HIDDEN;
|
||||
extern void NC_HandleNCCalcSize( HWND hwnd, WPARAM wParam, RECT *winRect ) DECLSPEC_HIDDEN;
|
||||
extern LRESULT NC_HandleNCHitTest( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
|
||||
extern LRESULT NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
|
||||
extern LRESULT NC_HandleNCMouseMove( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -260,7 +260,8 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
|
|||
}
|
||||
|
||||
case WM_NCCALCSIZE:
|
||||
return NC_HandleNCCalcSize( hwnd, wParam, (RECT *)lParam );
|
||||
NC_HandleNCCalcSize( hwnd, wParam, (RECT *)lParam );
|
||||
break;
|
||||
|
||||
case WM_WINDOWPOSCHANGING:
|
||||
return WINPOS_HandleWindowPosChanging( hwnd, (WINDOWPOS *)lParam );
|
||||
|
|
|
@ -346,19 +346,14 @@ BOOL WINAPI DECLSPEC_HOTPATCH AdjustWindowRectExForDpi( LPRECT rect, DWORD style
|
|||
*
|
||||
* Handle a WM_NCCALCSIZE message. Called from DefWindowProc().
|
||||
*/
|
||||
LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wparam, RECT *winRect )
|
||||
void NC_HandleNCCalcSize( HWND hwnd, WPARAM wparam, RECT *winRect )
|
||||
{
|
||||
RECT tmpRect = { 0, 0, 0, 0 };
|
||||
LRESULT result = 0;
|
||||
LONG cls_style = GetClassLongW(hwnd, GCL_STYLE);
|
||||
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
|
||||
LONG exStyle = GetWindowLongW( hwnd, GWL_EXSTYLE );
|
||||
|
||||
if (winRect == NULL)
|
||||
return 0;
|
||||
|
||||
if (cls_style & CS_VREDRAW) result |= WVR_VREDRAW;
|
||||
if (cls_style & CS_HREDRAW) result |= WVR_HREDRAW;
|
||||
return;
|
||||
|
||||
if (!(style & WS_MINIMIZE))
|
||||
{
|
||||
|
@ -413,7 +408,6 @@ LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wparam, RECT *winRect )
|
|||
winRect->right = winRect->left;
|
||||
winRect->bottom = winRect->top;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1475,7 +1475,6 @@ static void test_nonclient_area(HWND hwnd)
|
|||
|
||||
rc = rc_window;
|
||||
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
|
||||
todo_wine_if(ret != 0)
|
||||
ok(!ret, "got %08lx\n", ret);
|
||||
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
|
||||
ok(EqualRect(&rc, &rc_client),
|
||||
|
@ -1494,7 +1493,6 @@ todo_wine_if(ret != 0)
|
|||
|
||||
rc = rc_window;
|
||||
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)&rc);
|
||||
todo_wine_if(ret != 0)
|
||||
ok(!ret, "got %08lx\n", ret);
|
||||
MapWindowPoints(0, hwnd, (LPPOINT)&rc, 2);
|
||||
ok(EqualRect(&rc, &rc_client),
|
||||
|
@ -12966,25 +12964,21 @@ static void test_WM_NCCALCSIZE(void)
|
|||
params.lppos = &winpos;
|
||||
|
||||
ret = SendMessageW(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
|
||||
todo_wine
|
||||
ok(!ret, "got %08lx\n", ret);
|
||||
ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
|
||||
|
||||
params.rgrc[0] = window_rect;
|
||||
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, TRUE, (LPARAM)¶ms);
|
||||
todo_wine
|
||||
ok(!ret, "got %08lx\n", ret);
|
||||
ok(EqualRect(¶ms.rgrc[0], &client_rect), "got %s\n", wine_dbgstr_rect(¶ms.rgrc[0]));
|
||||
|
||||
GetWindowRect(hwnd, &window_rect);
|
||||
ret = SendMessageW(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect);
|
||||
todo_wine
|
||||
ok(!ret, "got %08lx\n", ret);
|
||||
ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
|
||||
|
||||
GetWindowRect(hwnd, &window_rect);
|
||||
ret = DefWindowProcA(hwnd, WM_NCCALCSIZE, FALSE, (LPARAM)&window_rect);
|
||||
todo_wine
|
||||
ok(!ret, "got %08lx\n", ret);
|
||||
ok(EqualRect(&window_rect, &client_rect), "got %s\n", wine_dbgstr_rect(&window_rect));
|
||||
|
||||
|
|
Loading…
Reference in New Issue