https://git.reactos.org/?p=reactos.git;a=commitdiff;h=58b0558f94abee52ce1c26...
commit 58b0558f94abee52ce1c261063d4f4b884e96310 Author: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com AuthorDate: Tue Oct 13 16:37:52 2020 +0900 Commit: GitHub noreply@github.com CommitDate: Tue Oct 13 16:37:52 2020 +0900
[NTUSER] Fix Shell Hook HSHELL_WINDOWCREATED (#3294)
Fix Shell Hook and reduce failures of shell32_apitest ShellHook testcase. Fix the condition of notifying shell hook HSHELL_WINDOWCREATED in ntuser/winpos.c. CORE-17330 --- win32ss/user/ntuser/winpos.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/win32ss/user/ntuser/winpos.c b/win32ss/user/ntuser/winpos.c index b5927d183c2..9a74a16e45b 100644 --- a/win32ss/user/ntuser/winpos.c +++ b/win32ss/user/ntuser/winpos.c @@ -1904,18 +1904,13 @@ co_WinPosSetWindowPos( } else if (WinPos.flags & SWP_SHOWWINDOW) { - if (Window->spwndOwner == NULL || - !(Window->spwndOwner->style & WS_VISIBLE) || - (Window->spwndOwner->ExStyle & WS_EX_TOOLWINDOW)) + if ((Window->ExStyle & WS_EX_APPWINDOW) || + (!(Window->ExStyle & WS_EX_TOOLWINDOW) && !Window->spwndOwner && + (!Window->spwndParent || UserIsDesktopWindow(Window->spwndParent)))) { - if (UserIsDesktopWindow(Window->spwndParent) && - (!(Window->ExStyle & WS_EX_TOOLWINDOW) || - (Window->ExStyle & WS_EX_APPWINDOW))) - { - co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)Window->head.h, 0); - if (!(WinPos.flags & SWP_NOACTIVATE)) - UpdateShellHook(Window); - } + co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)Window->head.h, 0); + if (!(WinPos.flags & SWP_NOACTIVATE)) + UpdateShellHook(Window); }
Window->style |= WS_VISIBLE; //IntSetStyle( Window, WS_VISIBLE, 0 );