Commit ef10cd8b authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

taskmgr: SwitchToThisWindow() is available, remove alternate code path.

parent 054be18f
...@@ -47,8 +47,6 @@ static int nApplicationPageHeight; ...@@ -47,8 +47,6 @@ static int nApplicationPageHeight;
static HANDLE hApplicationPageEvent = NULL; /* When this event becomes signaled then we refresh the app list */ static HANDLE hApplicationPageEvent = NULL; /* When this event becomes signaled then we refresh the app list */
static BOOL bSortAscending = TRUE; static BOOL bSortAscending = TRUE;
static const WCHAR wszUser32[] = {'U','S','E','R','3','2','.','D','L','L',0};
static void ApplicationPageUpdate(void) static void ApplicationPageUpdate(void)
{ {
/* Enable or disable the "End Task" & "Switch To" buttons */ /* Enable or disable the "End Task" & "Switch To" buttons */
...@@ -743,19 +741,7 @@ void ApplicationPage_OnSwitchTo(void) ...@@ -743,19 +741,7 @@ void ApplicationPage_OnSwitchTo(void)
} }
} }
if (pAPLI) { if (pAPLI) {
typedef void (WINAPI *PROCSWITCHTOTHISWINDOW) (HWND, BOOL); SwitchToThisWindow(pAPLI->hWnd, TRUE);
PROCSWITCHTOTHISWINDOW SwitchToThisWindow;
HMODULE hUser32 = GetModuleHandleW(wszUser32);
SwitchToThisWindow = (PROCSWITCHTOTHISWINDOW)GetProcAddress(hUser32, "SwitchToThisWindow");
if (SwitchToThisWindow) {
SwitchToThisWindow(pAPLI->hWnd, TRUE);
} else {
if (IsIconic(pAPLI->hWnd))
ShowWindow(pAPLI->hWnd, SW_RESTORE);
BringWindowToTop(pAPLI->hWnd);
SetForegroundWindow(pAPLI->hWnd);
}
if (TaskManagerSettings.MinimizeOnUse) if (TaskManagerSettings.MinimizeOnUse)
ShowWindow(hMainWnd, SW_MINIMIZE); ShowWindow(hMainWnd, SW_MINIMIZE);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment