mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[Win32SS]
- HAX : Fix paint message spam. See CORE-12169 and related issues. svn path=/trunk/; revision=73372
This commit is contained in:
parent
fbf2c84e20
commit
03c1491725
|
@ -789,8 +789,8 @@ IntDispatchMessage(PMSG pMsg)
|
|||
{
|
||||
Window->state2 &= ~WNDS2_WMPAINTSENT;
|
||||
/* send a WM_ERASEBKGND if the non-client area is still invalid */
|
||||
ERR("Message WM_PAINT\n");
|
||||
co_IntPaintWindows( Window, RDW_NOCHILDREN, FALSE );
|
||||
ERR("Message WM_PAINT count %d Internal Paint Set? %s\n",Window->head.pti->cPaintsReady, Window->state & WNDS_INTERNALPAINT ? "TRUE" : "FALSE");
|
||||
IntPaintWindow( Window );
|
||||
}
|
||||
|
||||
return retval;
|
||||
|
|
|
@ -1157,6 +1157,36 @@ IntFindWindowToRepaint(PWND Window, PTHREADINFO Thread)
|
|||
return Window;
|
||||
}
|
||||
|
||||
//
|
||||
// Hax around internal painting of windows.
|
||||
//
|
||||
VOID FASTCALL
|
||||
IntPaintWindow( PWND Window )
|
||||
{
|
||||
// Handle normal painting.
|
||||
co_IntPaintWindows( Window, RDW_NOCHILDREN, FALSE );
|
||||
|
||||
// Hack to prevent more spamming from misbehaving application.
|
||||
// Handle it like a begin/end paint
|
||||
if (Window->hrgnUpdate != NULL)
|
||||
{
|
||||
ERR("HAX hrgnUpdate not NULL! Dec Paint Count!\n");
|
||||
MsqDecPaintCountQueue(Window->head.pti);
|
||||
IntGdiSetRegionOwner(Window->hrgnUpdate, GDI_OBJ_HMGR_POWNED);
|
||||
GreDeleteObject(Window->hrgnUpdate);
|
||||
Window->state &= ~WNDS_UPDATEDIRTY;
|
||||
Window->hrgnUpdate = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(Window->state & WNDS_INTERNALPAINT))
|
||||
{
|
||||
ERR("HAX WNDS_INTERNALPAINT not set! Dec Paint Count!\n");
|
||||
MsqDecPaintCountQueue(Window->head.pti);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BOOL FASTCALL
|
||||
IntGetPaintMessage(
|
||||
PWND Window,
|
||||
|
|
|
@ -40,3 +40,4 @@ BOOL FASTCALL IntIsWindowDrawable(PWND);
|
|||
BOOL UserDrawCaption(PWND,HDC,RECTL*,HFONT,HICON,const PUNICODE_STRING,UINT);
|
||||
VOID FASTCALL UpdateThreadWindows(PWND,PTHREADINFO,HRGN);
|
||||
VOID FASTCALL UserSyncAndPaintWindows(PWND pWnd, ULONG Flags);
|
||||
VOID FASTCALL IntPaintWindow(PWND);
|
||||
|
|
Loading…
Reference in a new issue