From fcdfd8831e816f8a57fca65e8a7f09f5440d89d0 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Mon, 2 Mar 2015 06:45:19 +0000 Subject: [PATCH] [NtUser] - Fix test for child windows. This is for painting changes. See CORE-7447. svn path=/trunk/; revision=66540 --- reactos/win32ss/user/ntuser/window.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/reactos/win32ss/user/ntuser/window.c b/reactos/win32ss/user/ntuser/window.c index 2012f69f6ec..504a4859dc5 100644 --- a/reactos/win32ss/user/ntuser/window.c +++ b/reactos/win32ss/user/ntuser/window.c @@ -850,25 +850,25 @@ IntSetMenu( /* INTERNAL ******************************************************************/ - +//// +// This fixes a check for children messages that need paint while searching the parents messages! +// Fixes wine msg:test_paint_messages:WmParentErasePaint .. +//// BOOL FASTCALL IntIsChildWindow(PWND Parent, PWND BaseWindow) { - PWND Window; - - Window = BaseWindow; - while (Window && ((Window->style & (WS_POPUP|WS_CHILD)) == WS_CHILD)) + PWND Window = BaseWindow; + do { - if (Window == Parent) - { - return(TRUE); - } + if ( Window == NULL || (Window->style & (WS_POPUP|WS_CHILD)) != WS_CHILD ) + return FALSE; - Window = Window->spwndParent; + Window = Window->spwndParent; } - - return(FALSE); + while(Parent != Window); + return TRUE; } +//// /* Link the window into siblings list