mirror of
https://github.com/reactos/reactos.git
synced 2025-05-07 02:41:22 +00:00
[USER32] Fix Task Switcher (#976)
This fix is needed for the Delphi GUI programs. - Don't enumerate the windows whose owner window exists. - Use PostMessage SC_RESTORE instead of ShowWindowAsync SW_RESTORE. CORE-15165
This commit is contained in:
parent
ea84aef662
commit
4ccad609e0
1 changed files with 4 additions and 1 deletions
|
@ -125,7 +125,7 @@ void ResizeAndCenter(HWND hwnd, int width, int height)
|
||||||
void MakeWindowActive(HWND hwnd)
|
void MakeWindowActive(HWND hwnd)
|
||||||
{
|
{
|
||||||
if (IsIconic(hwnd))
|
if (IsIconic(hwnd))
|
||||||
ShowWindowAsync(hwnd, SW_RESTORE);
|
PostMessageW(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
|
||||||
|
|
||||||
BringWindowToTop(hwnd); // same as: SetWindowPos(hwnd,HWND_TOP,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); ?
|
BringWindowToTop(hwnd); // same as: SetWindowPos(hwnd,HWND_TOP,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); ?
|
||||||
SetForegroundWindow(hwnd);
|
SetForegroundWindow(hwnd);
|
||||||
|
@ -171,6 +171,9 @@ BOOL CALLBACK EnumerateCallback(HWND window, LPARAM lParam)
|
||||||
if (!IsWindowVisible(window))
|
if (!IsWindowVisible(window))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
if (GetWindow(window, GW_OWNER) != NULL)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
GetClassNameW(window, windowText, _countof(windowText));
|
GetClassNameW(window, windowText, _countof(windowText));
|
||||||
if ((wcscmp(L"Shell_TrayWnd", windowText)==0) ||
|
if ((wcscmp(L"Shell_TrayWnd", windowText)==0) ||
|
||||||
(wcscmp(L"Progman", windowText)==0) )
|
(wcscmp(L"Progman", windowText)==0) )
|
||||||
|
|
Loading…
Reference in a new issue