[0.4.9][WIN32SS] Improve many apps not starting with active taskbar pane (#2396)

Many thanks to the patches author JIRA-user "blueghost"
tibor.fuzi@gmail.com

The patch fixes regression CORE-16703, which was unhidden by explorer commit
8ad0eae687 == SVN r74968
although the root-cause was missing functionality in WIN32SS.

The patch also fixes CORE-16705 and CORE-16706.
fix picked from 0.4.14-dev-1137-g 848d7ec633
----------
And while touching winpos.c I decided to also port back the
fix for the format-string-glitch from #1893 authored by Stanislav Motylkov.
fix picked from 0.4.13-dev-1079-g b16ca9cd65
This commit is contained in:
Joachim Henze 2020-12-19 20:50:12 +01:00
parent 959f2dd103
commit c0995eebd5
2 changed files with 8 additions and 4 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

@ -1694,7 +1694,7 @@ co_WinPosSetWindowPos(
ASSERT_REFS_CO(Window);
TRACE("pwnd %p, after %p, %d,%d (%dx%d), flags %s",
TRACE("pwnd %p, after %p, %d,%d (%dx%d), flags 0x%x",
Window, WndInsertAfter, x, y, cx, cy, flags);
#if DBG
dump_winpos_flags(flags);
@ -1856,7 +1856,11 @@ co_WinPosSetWindowPos(
Window->spwndOwner == NULL &&
(!(Window->ExStyle & WS_EX_TOOLWINDOW) ||
(Window->ExStyle & WS_EX_APPWINDOW)))
co_IntShellHookNotify(HSHELL_WINDOWCREATED, (WPARAM)Window->head.h, 0);
{
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++;