[0.4.11][NTUSER] Fix taskbar panes activation (#2046) (#3294) (#3697) (#3700), [SHELL32] (#4800)

This is a squashed backport of the following commits:
0.4.13-RC-53-g 4f628f6b16 (partial pick of shell32-changes for Miranda CORE-14439 & Winamp CORE-13584, explorer left out)
0.4.14-dev-369-g 141cf04239 (#2046) NTUSER
0.4.15-dev-1126-g 58b0558f94 (#3294) NTUSER
0.4.15-dev-2618-g 32b0cf6fc6 (#3697) NTUSER
0.4.15-dev-2621-g 59d4c11203 (#3700) NTUSER
0.4.15-dev-5242-g e6fb0e0c25 (#4800) Cleanup

brings us closer to releases/0.4.14

In the older branches it will fix the following bugs (or prevents introducing them):
CORE-13584 'Winamp 5.666 erroneously has a secret tab shown in taskbar'
CORE-14380 'Effective File Search 6.8.1 when you open up the app via desktop link there is no pane in taskbar'
CORE-14439 'Miranda IM 0.10.21 snap-to-monitor-border-feature brings ros to halt'
CORE-15655 'Click-N-Type Virtual Keyboard 3.03.0412 has no taskbar pane'
CORE-15669 'DVD Write Now 1.5.12 SP2 setup has no taskbar pane'
CORE-15716 'Photofiltr 7.2.1 has no taskbar pane'
CORE-15731 'Java JRE 6u45 setup, last page of setup has no taskbar pane'
CORE-16030 'Moo0 Audio Recorder - the taskbar icon does not appear'
(CORE-17330 Regression, many installers that should have only 1 taskbar pane, now have 2 of them erroneously)
This commit is contained in:
Joachim Henze 2022-10-22 22:30:15 +02:00
parent e3ebe9f583
commit 2e51363fef
7 changed files with 203 additions and 85 deletions

View file

@ -2257,13 +2257,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 */

View file

@ -1850,15 +1850,23 @@ 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 (!(WinPos.flags & SWP_NOACTIVATE))
UpdateShellHook(Window);
}
if (Window->style & WS_CHILD)
{
if ((Window->style & WS_POPUP) && (Window->ExStyle & WS_EX_APPWINDOW))
{
co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)Window->head.h, 0);
if (!(WinPos.flags & SWP_NOACTIVATE))
UpdateShellHook(Window);
}
}
else if ((Window->ExStyle & WS_EX_APPWINDOW) ||
(!(Window->ExStyle & WS_EX_TOOLWINDOW) && !Window->spwndOwner &&
(!Window->spwndParent || UserIsDesktopWindow(Window->spwndParent))))
{
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 );
Window->head.pti->cVisWindows++;
@ -2464,9 +2472,8 @@ co_WinPosShowWindow(PWND Wnd, INT Cmd)
Swp |= SWP_NOACTIVATE | SWP_NOZORDER;
/* Fall through. */
case SW_SHOWMINIMIZED:
case SW_MINIMIZE: /* CORE-15669: SW_MINIMIZE also shows */
Swp |= SWP_SHOWWINDOW;
/* Fall through. */
case SW_MINIMIZE:
{
Swp |= SWP_NOACTIVATE;
if (!(style & WS_MINIMIZE))
@ -2561,7 +2568,7 @@ co_WinPosShowWindow(PWND Wnd, INT Cmd)
default:
//ERR("co_WinPosShowWindow Exit Good 4\n");
return WasVisible;
return FALSE;
}
ShowFlag = (Cmd != SW_HIDE);