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.
This commit is contained in:
Window Maker 2026-05-24 14:18:39 +02:00
parent 91c49c8631
commit aab89ab11a
1 changed files with 8 additions and 1 deletions

View File

@ -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);
}
}
/************************************/