mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
Generate WM_PAINT messages in PeekMessage()
svn path=/trunk/; revision=4706
This commit is contained in:
parent
397169c1a8
commit
7ba70583b9
1 changed files with 37 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: message.c,v 1.16 2003/05/11 12:29:41 jfilby Exp $
|
||||
/* $Id: message.c,v 1.17 2003/05/18 06:47:19 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -316,7 +316,42 @@ NtUserPeekMessage(LPMSG lpMsg,
|
|||
/* Check for sent messages again. */
|
||||
while (MsqDispatchOneSentMessage(ThreadQueue));
|
||||
|
||||
/* FIXME: Check for paint messages. */
|
||||
/* Check for paint messages. */
|
||||
|
||||
/* Check for paint messages. */
|
||||
if (ThreadQueue->PaintPosted)
|
||||
{
|
||||
PWINDOW_OBJECT WindowObject;
|
||||
|
||||
lpMsg->hwnd = PaintingFindWinToRepaint(hWnd, PsGetWin32Thread());
|
||||
lpMsg->message = WM_PAINT;
|
||||
lpMsg->wParam = lpMsg->lParam = 0;
|
||||
|
||||
WindowObject = W32kGetWindowObject(lpMsg->hwnd);
|
||||
if (WindowObject != NULL)
|
||||
{
|
||||
if (WindowObject->Style & WS_MINIMIZE &&
|
||||
(HICON)NtUserGetClassLong(lpMsg->hwnd, GCL_HICON) != NULL)
|
||||
{
|
||||
lpMsg->message = WM_PAINTICON;
|
||||
lpMsg->wParam = 1;
|
||||
}
|
||||
|
||||
if (lpMsg->hwnd == NULL || lpMsg->hwnd == hWnd ||
|
||||
W32kIsChildWindow(hWnd, lpMsg->hwnd))
|
||||
{
|
||||
if (WindowObject->Flags & WINDOWOBJECT_NEED_INTERNALPAINT &&
|
||||
WindowObject->UpdateRegion == NULL)
|
||||
{
|
||||
WindowObject->Flags &= ~WINDOWOBJECT_NEED_INTERNALPAINT;
|
||||
MsqDecPaintCountQueue(WindowObject->MessageQueue);
|
||||
}
|
||||
}
|
||||
W32kReleaseWindowObject(WindowObject);
|
||||
}
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue