mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[NTUSER] Fix condition of HSHELL_WINDOWCREATED (#2046)
CORE-15655 If the owner window doesn't exist or is invisible or has WS_EX_TOOLWINDOW style, HSHELL_WINDOWCREATED regards the window a non-owned window. You can watch the shell hook information by using CORE-15655 ShellHookChecker.zip.
This commit is contained in:
parent
fa264251a7
commit
141cf04239
2 changed files with 21 additions and 11 deletions
|
@ -2351,13 +2351,17 @@ co_UserCreateWindowEx(CREATESTRUCTW* Cs,
|
|||
IntSendParentNotify(Window, WM_CREATE);
|
||||
|
||||
/* Notify the shell that a new window was created */
|
||||
if (UserIsDesktopWindow(Window->spwndParent) &&
|
||||
Window->spwndOwner == NULL &&
|
||||
(Window->style & WS_VISIBLE) &&
|
||||
(!(Window->ExStyle & WS_EX_TOOLWINDOW) ||
|
||||
(Window->ExStyle & WS_EX_APPWINDOW)))
|
||||
if (Window->spwndOwner == NULL ||
|
||||
!(Window->spwndOwner->style & WS_VISIBLE) ||
|
||||
(Window->spwndOwner->ExStyle & WS_EX_TOOLWINDOW))
|
||||
{
|
||||
co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)hWnd, 0);
|
||||
if (UserIsDesktopWindow(Window->spwndParent) &&
|
||||
(Window->style & WS_VISIBLE) &&
|
||||
(!(Window->ExStyle & WS_EX_TOOLWINDOW) ||
|
||||
(Window->ExStyle & WS_EX_APPWINDOW)))
|
||||
{
|
||||
co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)hWnd, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* Initialize and show the window's scrollbars */
|
||||
|
|
|
@ -1904,11 +1904,17 @@ co_WinPosSetWindowPos(
|
|||
}
|
||||
else if (WinPos.flags & SWP_SHOWWINDOW)
|
||||
{
|
||||
if (UserIsDesktopWindow(Window->spwndParent) &&
|
||||
Window->spwndOwner == NULL &&
|
||||
(!(Window->ExStyle & WS_EX_TOOLWINDOW) ||
|
||||
(Window->ExStyle & WS_EX_APPWINDOW)))
|
||||
co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)Window->head.h, 0);
|
||||
if (Window->spwndOwner == NULL ||
|
||||
!(Window->spwndOwner->style & WS_VISIBLE) ||
|
||||
(Window->spwndOwner->ExStyle & WS_EX_TOOLWINDOW))
|
||||
{
|
||||
if (UserIsDesktopWindow(Window->spwndParent) &&
|
||||
(!(Window->ExStyle & WS_EX_TOOLWINDOW) ||
|
||||
(Window->ExStyle & WS_EX_APPWINDOW)))
|
||||
{
|
||||
co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)Window->head.h, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Window->style |= WS_VISIBLE; //IntSetStyle( Window, WS_VISIBLE, 0 );
|
||||
Window->head.pti->cVisWindows++;
|
||||
|
|
Loading…
Reference in a new issue