From 1d54ddf25580e0151bb7f1fc3841414dfcad1291 Mon Sep 17 00:00:00 2001 From: lkn Date: Sun, 21 Jun 2026 18:36:24 +0200 Subject: [PATCH] icon: draw dock dots/stipple at end of wIconPaint for docked appicons Move the appicon_paint_dock_dots call into wIconPaint itself (after icon_paint), so that ANY repaint of a docked appicon includes dots and launching stipple. Previously, the dots were only drawn from wAppIconPaint and the observers, but other repaint paths (pointer events, window_clear) would erase them. Remove the now-redundant calls from appearanceObserver and tileObserver since wIconPaint handles it. --- src/icon.c | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/src/icon.c b/src/icon.c index 781e3ce..f1d35ef 100644 --- a/src/icon.c +++ b/src/icon.c @@ -85,16 +85,6 @@ static void appearanceObserver(void *self, WMNotification *notif) /* so that the appicon expose handlers will paint the appicon specific * stuff */ wm_backend->window_clear(icon->core->window); - - /* Repaint dock dots (no Expose events on Wayland). */ - if (icon->core->descriptor.parent_type == WCLASS_APPICON) { - WAppIcon *aicon = icon->core->descriptor.parent; - if (aicon && aicon->docked) { - WApplication *wapp = icon->owner ? - wApplicationOf(icon->owner->main_window) : NULL; - wm_backend->appicon_paint_dock_dots(aicon, wapp); - } - } } static void tileObserver(void *self, WMNotification *notif) @@ -113,16 +103,6 @@ static void tileObserver(void *self, WMNotification *notif) if (scr->clip_icon && scr->clip_icon->icon == icon) { wClipIconPaint(scr->clip_icon); } - - /* For docked appicons, repaint dock dots (no Expose on Wayland). */ - if (icon->core->descriptor.parent_type == WCLASS_APPICON) { - WAppIcon *aicon = icon->core->descriptor.parent; - if (aicon && aicon->docked) { - WApplication *wapp = icon->owner ? - wApplicationOf(icon->owner->main_window) : NULL; - wm_backend->appicon_paint_dock_dots(aicon, wapp); - } - } } /************************************/ @@ -860,6 +840,19 @@ void wIconPaint(WIcon *icon) /* Allow the backend to composite the full icon (tile + image + title) * and commit it to its rendering surface. */ wm_backend->icon_paint(icon); + + /* For docked appicons, overlay dock dots / launching stipple. + * On X11 this was triggered by Expose events; on Wayland we must + * do it explicitly on every paint. */ + if (icon->core->descriptor.parent_type == WCLASS_APPICON || + icon->core->descriptor.parent_type == WCLASS_DOCK_ICON) { + WAppIcon *aicon = icon->core->descriptor.parent; + if (aicon && aicon->docked) { + WApplication *wapp = icon->owner ? + wApplicationOf(icon->owner->main_window) : NULL; + wm_backend->appicon_paint_dock_dots(aicon, wapp); + } + } } /******************************************************************/