1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-03-19 09:13:33 +01:00

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.
This commit is contained in:
2026-03-12 15:59:56 +01:00
committed by Carlos R. Mafra
parent b27b44db72
commit ae050ceb40

View File

@@ -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);