Skip to content

Commit c7fadfa

Browse files
committed
[0.4.12][WIN32SS] Revert "Make App Switcher use the owner window's icon (reactos#1299)"
to protect our latest improvement of showing correct cpl icons in taskswitch CORE-16086 This reverts commit 0.4.12-dev-437-g 484943d which was done in context of CORE-15672 (without being able to resolve that ticket) 0.4.12-dev-437 contrasts our latest information c.f. Raymond Chen's article: http://blogs.msdn.com/b/oldnewthing/archive/2007/10/08/5351207.aspx Eventually we should select the icon instead using that same algorithm.
1 parent a57363f commit c7fadfa

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

win32ss/user/user32/controls/appswitch.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,24 +165,20 @@ void CompleteSwitch(BOOL doSwitch)
165165
BOOL CALLBACK EnumerateCallback(HWND window, LPARAM lParam)
166166
{
167167
HICON hIcon;
168-
HWND hwndIcon, hwndOwner;
169168

170169
UNREFERENCED_PARAMETER(lParam);
171170

172-
hwndOwner = GetWindow(window, GW_OWNER);
173-
hwndIcon = (hwndOwner ? hwndOwner : window);
174-
175171
// First try to get the big icon assigned to the window
176-
hIcon = (HICON)SendMessageW(hwndIcon, WM_GETICON, ICON_BIG, 0);
172+
hIcon = (HICON)SendMessageW(window, WM_GETICON, ICON_BIG, 0);
177173
if (!hIcon)
178174
{
179175
// If no icon is assigned, try to get the icon assigned to the windows' class
180-
hIcon = (HICON)GetClassLongPtrW(hwndIcon, GCL_HICON);
176+
hIcon = (HICON)GetClassLongPtrW(window, GCL_HICON);
181177
if (!hIcon)
182178
{
183179
// If we still don't have an icon, see if we can do with the small icon,
184180
// or a default application icon
185-
hIcon = (HICON)SendMessageW(hwndIcon, WM_GETICON, ICON_SMALL2, 0);
181+
hIcon = (HICON)SendMessageW(window, WM_GETICON, ICON_SMALL2, 0);
186182
if (!hIcon)
187183
{
188184
// using windows logo icon as default

0 commit comments

Comments
 (0)