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

This commit is contained in:
Alexandre Julliard 2010-09-24 12:46:02 +02:00
parent d7d9cd5eb2
commit deb8309760
3 changed files with 8 additions and 4 deletions

View File

@ -167,7 +167,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, 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_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCLButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam) DECLSPEC_HIDDEN;

View File

@ -309,7 +309,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
}
case WM_NCCALCSIZE:
return NC_HandleNCCalcSize( hwnd, (RECT *)lParam );
return NC_HandleNCCalcSize( hwnd, wParam, (RECT *)lParam );
case WM_WINDOWPOSCHANGING:
return WINPOS_HandleWindowPosChanging( hwnd, (WINDOWPOS *)lParam );

View File

@ -410,7 +410,7 @@ BOOL WINAPI AdjustWindowRectEx( LPRECT rect, DWORD style, BOOL menu, DWORD exSty
*
* 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 };
LRESULT result = 0;
@ -451,7 +451,11 @@ LRESULT NC_HandleNCCalcSize( HWND hwnd, RECT *winRect )
- GetSystemMetrics(SM_CYEDGE));
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)
winRect->left += GetSystemMetrics(SM_CXVSCROLL);
else