From: Katayama Hirofumi MZ Date: Sun, 2 Jun 2019 23:47:43 +0000 (+0900) Subject: Revert "[USER32] Make App Switcher use the owner window's icon (#1299)" (#1605) X-Git-Tag: 0.4.14-dev~883 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=a73c17fcd9d9bd96b443ee4acf7804974d73853b;hp=be88574f5953bfc3e08f1ed7c094387adc34cf7e Revert "[USER32] Make App Switcher use the owner window's icon (#1299)" (#1605) This reverts commit 484943d04f0dc3f84b7c8e754d1d2505f0a41df3. --- diff --git a/win32ss/user/user32/controls/appswitch.c b/win32ss/user/user32/controls/appswitch.c index ac9c5d0ee24..737663a17db 100644 --- a/win32ss/user/user32/controls/appswitch.c +++ b/win32ss/user/user32/controls/appswitch.c @@ -165,24 +165,20 @@ void CompleteSwitch(BOOL doSwitch) BOOL CALLBACK EnumerateCallback(HWND window, LPARAM lParam) { HICON hIcon; - HWND hwndIcon, hwndOwner; UNREFERENCED_PARAMETER(lParam); - hwndOwner = GetWindow(window, GW_OWNER); - hwndIcon = (hwndOwner ? hwndOwner : window); - // First try to get the big icon assigned to the window - hIcon = (HICON)SendMessageW(hwndIcon, WM_GETICON, ICON_BIG, 0); + hIcon = (HICON)SendMessageW(window, WM_GETICON, ICON_BIG, 0); if (!hIcon) { // If no icon is assigned, try to get the icon assigned to the windows' class - hIcon = (HICON)GetClassLongPtrW(hwndIcon, GCL_HICON); + hIcon = (HICON)GetClassLongPtrW(window, GCL_HICON); if (!hIcon) { // If we still don't have an icon, see if we can do with the small icon, // or a default application icon - hIcon = (HICON)SendMessageW(hwndIcon, WM_GETICON, ICON_SMALL2, 0); + hIcon = (HICON)SendMessageW(window, WM_GETICON, ICON_SMALL2, 0); if (!hIcon) { // using windows logo icon as default