Commit deb83097 authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Fix initial computation of client area in WM_NCCALCSIZE for RTL windows.

parent d7d9cd5e
...@@ -167,7 +167,7 @@ extern void MENU_EndMenu(HWND) DECLSPEC_HIDDEN; ...@@ -167,7 +167,7 @@ extern void MENU_EndMenu(HWND) DECLSPEC_HIDDEN;
/* nonclient area */ /* nonclient area */
extern LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip) DECLSPEC_HIDDEN; 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_HandleNCActivate( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCCalcSize( HWND hwnd, RECT *winRect ) DECLSPEC_HIDDEN; extern LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wParam, RECT *winRect ) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCHitTest( HWND hwnd, POINT pt ) 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_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCLButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam) DECLSPEC_HIDDEN; extern LRESULT NC_HandleNCLButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam) DECLSPEC_HIDDEN;
......
...@@ -309,7 +309,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa ...@@ -309,7 +309,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
} }
case WM_NCCALCSIZE: case WM_NCCALCSIZE:
return NC_HandleNCCalcSize( hwnd, (RECT *)lParam ); return NC_HandleNCCalcSize( hwnd, wParam, (RECT *)lParam );
case WM_WINDOWPOSCHANGING: case WM_WINDOWPOSCHANGING:
return WINPOS_HandleWindowPosChanging( hwnd, (WINDOWPOS *)lParam ); return WINPOS_HandleWindowPosChanging( hwnd, (WINDOWPOS *)lParam );
......
...@@ -410,7 +410,7 @@ BOOL WINAPI AdjustWindowRectEx( LPRECT rect, DWORD style, BOOL menu, DWORD exSty ...@@ -410,7 +410,7 @@ BOOL WINAPI AdjustWindowRectEx( LPRECT rect, DWORD style, BOOL menu, DWORD exSty
* *
* Handle a WM_NCCALCSIZE message. Called from DefWindowProc(). * Handle a WM_NCCALCSIZE message. Called from DefWindowProc().
*/ */
LRESULT NC_HandleNCCalcSize( HWND hwnd, RECT *winRect ) LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wparam, RECT *winRect )
{ {
RECT tmpRect = { 0, 0, 0, 0 }; RECT tmpRect = { 0, 0, 0, 0 };
LRESULT result = 0; LRESULT result = 0;
...@@ -451,7 +451,11 @@ LRESULT NC_HandleNCCalcSize( HWND hwnd, RECT *winRect ) ...@@ -451,7 +451,11 @@ LRESULT NC_HandleNCCalcSize( HWND hwnd, RECT *winRect )
- GetSystemMetrics(SM_CYEDGE)); - GetSystemMetrics(SM_CYEDGE));
if (style & WS_VSCROLL) if (style & WS_VSCROLL)
if( winRect->right - winRect->left >= GetSystemMetrics(SM_CXVSCROLL)){ if (winRect->right - winRect->left >= GetSystemMetrics(SM_CXVSCROLL))
{
/* rectangle is in screen coords when wparam is false */
if (!wparam && (exStyle & WS_EX_LAYOUTRTL)) exStyle ^= WS_EX_LEFTSCROLLBAR;
if((exStyle & WS_EX_LEFTSCROLLBAR) != 0) if((exStyle & WS_EX_LEFTSCROLLBAR) != 0)
winRect->left += GetSystemMetrics(SM_CXVSCROLL); winRect->left += GetSystemMetrics(SM_CXVSCROLL);
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment