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.
This commit is contained in:
lkn 2026-06-21 18:36:24 +02:00
parent 4c5855958f
commit 1d54ddf255
1 changed files with 13 additions and 20 deletions

View File

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