From 128ba2ddc7e025a0832155d6f54cceae5e5cc565 Mon Sep 17 00:00:00 2001 From: David Maciejak Date: Sun, 8 Feb 2026 17:07:19 -0500 Subject: [PATCH] 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. --- src/switchpanel.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/switchpanel.c b/src/switchpanel.c index e12b97f9..d11d4e45 100644 --- a/src/switchpanel.c +++ b/src/switchpanel.c @@ -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 */