[NTUSER] Fix ShellHook notifications when creating/activating windows (#2396)

This commit is contained in:
JoachimHenze 2020-03-05 15:39:23 +01:00 committed by GitHub
parent d4699bc67f
commit 848d7ec633
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -52,7 +52,6 @@ VOID FASTCALL
UpdateShellHook(PWND Window)
{
if ( Window->spwndParent == UserGetDesktopWindow() &&
Window->spwndOwner == NULL &&
(!(Window->ExStyle & WS_EX_TOOLWINDOW) ||
(Window->ExStyle & WS_EX_APPWINDOW)))
{
@ -511,7 +510,8 @@ co_IntSendActivateMessages(PWND WindowPrev, PWND Window, BOOL MouseActivate, BOO
MAKEWPARAM(MouseActivate ? WA_CLICKACTIVE : WA_ACTIVE, (Window->style & WS_MINIMIZE) != 0),
(LPARAM)(WindowPrev ? UserHMGetHandle(WindowPrev) : 0));
UpdateShellHook(Window);
if (Window->style & WS_VISIBLE)
UpdateShellHook(Window);
Window->state &= ~WNDS_NONCPAINT;

View file

@ -1913,6 +1913,8 @@ co_WinPosSetWindowPos(
(Window->ExStyle & WS_EX_APPWINDOW)))
{
co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)Window->head.h, 0);
if (!(WinPos.flags & SWP_NOACTIVATE))
UpdateShellHook(Window);
}
}