Only send WM_PAINTICON and WM_ICONERASEBKGND to 16-bit windows (found
by Jeremy White).
This commit is contained in:
parent
486d020c1b
commit
998863bf63
|
@ -2278,17 +2278,8 @@ BOOL WINAPI PeekMessageW( MSG *msg_out, HWND hwnd, UINT first, UINT last, UINT f
|
||||||
|
|
||||||
WIN_RestoreWndsLock( locks );
|
WIN_RestoreWndsLock( locks );
|
||||||
|
|
||||||
/* need to fill the window handle for WM_PAINT message */
|
if (msg.message == WM_PAINT) /* clear internal paint flag */
|
||||||
if (msg.message == WM_PAINT)
|
|
||||||
{
|
|
||||||
if (IsIconic( msg.hwnd ) && GetClassLongW( msg.hwnd, GCL_HICON ))
|
|
||||||
{
|
|
||||||
msg.message = WM_PAINTICON;
|
|
||||||
msg.wParam = 1;
|
|
||||||
}
|
|
||||||
/* clear internal paint flag */
|
|
||||||
RedrawWindow( msg.hwnd, NULL, 0, RDW_NOINTERNALPAINT | RDW_NOCHILDREN );
|
RedrawWindow( msg.hwnd, NULL, 0, RDW_NOINTERNALPAINT | RDW_NOCHILDREN );
|
||||||
}
|
|
||||||
|
|
||||||
if ((queue = QUEUE_Current()))
|
if ((queue = QUEUE_Current()))
|
||||||
{
|
{
|
||||||
|
|
|
@ -250,8 +250,7 @@ HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
|
||||||
WIN_ReleasePtr( wndPtr );
|
WIN_ReleasePtr( wndPtr );
|
||||||
|
|
||||||
if (lps->fErase)
|
if (lps->fErase)
|
||||||
lps->fErase = !SendMessageA( hwnd, bIcon ? WM_ICONERASEBKGND : WM_ERASEBKGND,
|
lps->fErase = !SendMessageA( hwnd, WM_ERASEBKGND, (WPARAM)lps->hdc, 0 );
|
||||||
(WPARAM)lps->hdc, 0 );
|
|
||||||
|
|
||||||
TRACE("hdc = %p box = (%ld,%ld - %ld,%ld), fErase = %d\n",
|
TRACE("hdc = %p box = (%ld,%ld - %ld,%ld), fErase = %d\n",
|
||||||
lps->hdc, lps->rcPaint.left, lps->rcPaint.top, lps->rcPaint.right, lps->rcPaint.bottom,
|
lps->hdc, lps->rcPaint.left, lps->rcPaint.top, lps->rcPaint.right, lps->rcPaint.bottom,
|
||||||
|
|
|
@ -647,8 +647,7 @@ static HRGN RDW_Paint( WND* wndPtr, HRGN hrgn, UINT flags, UINT ex )
|
||||||
|
|
||||||
if (flags & RDW_UPDATENOW)
|
if (flags & RDW_UPDATENOW)
|
||||||
{
|
{
|
||||||
if (wndPtr->hrgnUpdate) /* wm_painticon wparam is 1 */
|
if (wndPtr->hrgnUpdate) SendMessageW( hWnd, WM_PAINT, 0, 0 );
|
||||||
SendMessageW( hWnd, (bIcon) ? WM_PAINTICON : WM_PAINT, bIcon, 0 );
|
|
||||||
}
|
}
|
||||||
else if (flags & RDW_ERASENOW)
|
else if (flags & RDW_ERASENOW)
|
||||||
{
|
{
|
||||||
|
@ -674,8 +673,7 @@ static HRGN RDW_Paint( WND* wndPtr, HRGN hrgn, UINT flags, UINT ex )
|
||||||
dcx &= ~DCX_INTERSECTRGN;
|
dcx &= ~DCX_INTERSECTRGN;
|
||||||
if (( hDC = GetDCEx( hWnd, hrgnRet, dcx )) )
|
if (( hDC = GetDCEx( hWnd, hrgnRet, dcx )) )
|
||||||
{
|
{
|
||||||
if (SendMessageW( hWnd, (bIcon) ? WM_ICONERASEBKGND : WM_ERASEBKGND,
|
if (SendMessageW( hWnd, WM_ERASEBKGND, (WPARAM)hDC, 0 ))
|
||||||
(WPARAM)hDC, 0 ))
|
|
||||||
wndPtr->flags &= ~WIN_NEEDS_ERASEBKGND;
|
wndPtr->flags &= ~WIN_NEEDS_ERASEBKGND;
|
||||||
ReleaseDC( hWnd, hDC );
|
ReleaseDC( hWnd, hDC );
|
||||||
}
|
}
|
||||||
|
|
|
@ -2453,6 +2453,17 @@ INT WINPROC_MapMsg32ATo16( HWND hwnd, UINT msg32, WPARAM wParam32,
|
||||||
*plparam = (LPARAM)next->hmenuIn;
|
*plparam = (LPARAM)next->hmenuIn;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
case WM_PAINT:
|
||||||
|
if (IsIconic( hwnd ) && GetClassLongW( hwnd, GCL_HICON ))
|
||||||
|
{
|
||||||
|
*pmsg16 = WM_PAINTICON;
|
||||||
|
*pwparam16 = 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
case WM_ERASEBKGND:
|
||||||
|
if (IsIconic( hwnd ) && GetClassLongW( hwnd, GCL_HICON ))
|
||||||
|
*pmsg16 = WM_ICONERASEBKGND;
|
||||||
|
return 0;
|
||||||
case WM_PAINTCLIPBOARD:
|
case WM_PAINTCLIPBOARD:
|
||||||
case WM_SIZECLIPBOARD:
|
case WM_SIZECLIPBOARD:
|
||||||
FIXME_(msg)("message %04x needs translation\n", msg32 );
|
FIXME_(msg)("message %04x needs translation\n", msg32 );
|
||||||
|
|
Loading…
Reference in New Issue