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

wmaker: use appicon icons in the switchpanel when existing

This patch is making sure the icons shown in the switchpanel
are also those used for the appicon. For example, for xterm
the icon used in the switchpanel is the default app and not the
icon provided by xterm app.
Seems that issue is also present in vanilla wmaker 0.96.
This commit is contained in:
David Maciejak
2026-02-08 17:07:19 -05:00
committed by Carlos R. Mafra
parent 7ca96b9ed6
commit 128ba2ddc7

View File

@@ -186,12 +186,18 @@ static void addIconForWindow(WSwitchPanel *panel, WMWidget *parent, WWindow *wwi
{
WMFrame *icon = WMCreateFrame(parent);
RImage *image = NULL;
WApplication *wapp;
WMSetFrameRelief(icon, WRFlat);
WMResizeWidget(icon, icon_tile_size, icon_tile_size);
WMMoveWidget(icon, x, y);
if (!WFLAGP(wwin, always_user_icon) && wwin->net_icon_image)
wapp = wApplicationOf(wwin->main_window);
if (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);
/* get_icon_image() includes the default icon image */