From 8fc6f71e553652a53dae030e74badcd6281e1112 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Mon, 28 Nov 2016 16:48:39 +0000 Subject: [PATCH] [Win32SS] - Revert HAX : Fix validating region with null. See CORE-12169 and related issues. svn path=/trunk/; revision=73403 --- reactos/win32ss/user/ntuser/painting.c | 22 +--------------------- reactos/win32ss/user/ntuser/simplecall.c | 7 ++----- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/reactos/win32ss/user/ntuser/painting.c b/reactos/win32ss/user/ntuser/painting.c index 309dd649939..43e8d88e6fb 100644 --- a/reactos/win32ss/user/ntuser/painting.c +++ b/reactos/win32ss/user/ntuser/painting.c @@ -1158,33 +1158,13 @@ IntFindWindowToRepaint(PWND Window, PTHREADINFO Thread) } // -// Hax around internal painting of windows. +// 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 diff --git a/reactos/win32ss/user/ntuser/simplecall.c b/reactos/win32ss/user/ntuser/simplecall.c index e1b0392fc7e..a32ed43b1ce 100644 --- a/reactos/win32ss/user/ntuser/simplecall.c +++ b/reactos/win32ss/user/ntuser/simplecall.c @@ -774,11 +774,8 @@ NtUserCallHwndParamLock( case TWOPARAM_ROUTINE_VALIDATERGN: { PREGION Rgn = REGION_LockRgn((HRGN)Param); - if (Rgn) - { - Ret = (DWORD)co_UserRedrawWindow( Window, NULL, Rgn, RDW_VALIDATE); - REGION_UnlockRgn(Rgn); - } + Ret = (DWORD)co_UserRedrawWindow( Window, NULL, Rgn, RDW_VALIDATE); + if (Rgn) REGION_UnlockRgn(Rgn); break; } }