From ae050ceb40fc9885bd6faaa33092b2bdb7d58d21 Mon Sep 17 00:00:00 2001 From: Roman Dobosz Date: Thu, 12 Mar 2026 15:59:56 +0100 Subject: [PATCH] Respect user defined icons. Currently, when switchpanel is invoked (usually by alt-tab), icons are taken with the order from higher priority to lower: * appicon * user defined icon * net_icon * default icon Using appicon, when no net_icon nor user icon is defined is good, although it will provide another confusion with user defined icons, which will be ignored for all apps which provide appicons. With this patch order of selecting icon for an app is: * user defined icon * appicon * net_icon * default icon Note, that even, if there is icon defined for certain application, usually it need to have "Ignore client supplied icon" checkbox ticked, especially for the apps like Firefox. --- src/switchpanel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/switchpanel.c b/src/switchpanel.c index d11d4e45..af6de524 100644 --- a/src/switchpanel.c +++ b/src/switchpanel.c @@ -193,9 +193,9 @@ static void addIconForWindow(WSwitchPanel *panel, WMWidget *parent, WWindow *wwi WMMoveWidget(icon, x, y); wapp = wApplicationOf(wwin->main_window); - if (wapp && wapp->app_icon && wapp->app_icon->icon && wapp->app_icon->icon->file_image) { + if (!WFLAGP(wwin, always_user_icon) && wapp && wapp->app_icon && + wapp->app_icon->icon && wapp->app_icon->icon->file_image) image = RRetainImage(wapp->app_icon->icon->file_image); - } if (!image && !WFLAGP(wwin, always_user_icon) && wwin->net_icon_image) image = RRetainImage(wwin->net_icon_image);