[PATCH] wmaker: use appicon icons in the switchpanel when existing

4 views
Skip to first unread message

david.m...@gmail.com

unread,
Feb 8, 2026, 5:35:14 PMFeb 8
to Window Maker Development
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 */
--
2.43.0
0001-wmaker-use-appicon-icons-in-the-switchpanel-when-exi.patch
Reply all
Reply to author
Forward
0 new messages