user32: Handle the undocumented behaviour in DefWindowProc for WM_NCACTIVATE that causes the nonclient area not to be redrawn.

If the lParam is 0xffffffff then the nonclient area is not redrawn.
This commit is contained in:
Rob Shearman 2008-03-18 12:06:59 +00:00 committed by Alexandre Julliard
parent 34fe91bf2b
commit 076c6fb550
3 changed files with 13 additions and 7 deletions

View File

@ -90,7 +90,7 @@ extern UINT MENU_FindSubMenu( HMENU *hmenu, HMENU hSubTarget ) DECLSPEC_HIDDEN;
/* nonclient area */
extern LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam ) 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_HandleNCHitTest( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
extern LRESULT NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;

View File

@ -386,7 +386,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
break;
case WM_NCACTIVATE:
return NC_HandleNCActivate( hwnd, wParam );
return NC_HandleNCActivate( hwnd, wParam, lParam );
case WM_NCDESTROY:
{

View File

@ -1123,7 +1123,7 @@ LRESULT NC_HandleNCPaint( HWND hwnd , HRGN clip)
*
* Handle a WM_NCACTIVATE message. Called from DefWindowProc().
*/
LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam )
LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam, LPARAM lParam )
{
WND* wndPtr = WIN_GetPtr( hwnd );
@ -1138,10 +1138,16 @@ LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam )
else wndPtr->flags &= ~WIN_NCACTIVATED;
WIN_ReleasePtr( wndPtr );
if (IsIconic(hwnd))
WINPOS_RedrawIconTitle( hwnd );
else
NC_DoNCPaint( hwnd, (HRGN)1, FALSE );
/* This isn't documented but is reproducible in at least XP SP2 and
* Outlook 2007 depends on it
*/
if (lParam != -1)
{
if (IsIconic(hwnd))
WINPOS_RedrawIconTitle( hwnd );
else
NC_DoNCPaint( hwnd, (HRGN)1, FALSE );
}
return TRUE;
}