From aab89ab11a5e274aefe4d9c163fab42a37fa9eea Mon Sep 17 00:00:00 2001 From: Window Maker Date: Sun, 24 May 2026 14:18:39 +0200 Subject: [PATCH] icon: repaint clip text after tile change tileObserver was calling window_clear after update_icon_pixmap, which on Wayland overwrote the painted icon with just the background tile (erasing clip workspace number/name text). On X11 this worked because XClearWindow triggers an Expose event that repaints everything. Fix: remove the redundant window_clear (update_icon_pixmap already calls wIconPaint which does window_clear + icon_paint internally), and explicitly call wClipIconPaint for the clip icon to redraw the workspace number and name overlay. --- src/icon.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/icon.c b/src/icon.c index 8b8d7a0..415b758 100644 --- a/src/icon.c +++ b/src/icon.c @@ -36,6 +36,7 @@ #include "window.h" #include "icon.h" #include "actions.h" +#include "dock.h" #include "stacking.h" #include "application.h" #include "defaults.h" @@ -95,7 +96,13 @@ static void tileObserver(void *self, WMNotification *notif) update_icon_pixmap(icon); - wm_backend->window_clear(icon->core->window); + /* For clip/drawer icons, repaint the workspace number/name text. + * update_icon_pixmap → wIconPaint renders the generic icon; the clip + * overlay (text) requires an additional clip_icon_paint call. */ + WScreen *scr = icon->core->screen_ptr; + if (scr->clip_icon && scr->clip_icon->icon == icon) { + wClipIconPaint(scr->clip_icon); + } } /************************************/