appicon: collapse wAppIconPaint into a thin wrapper over wIconPaint

wIconPaint already handles dock dots/stipple for docked appicons.
wAppIconPaint was redundantly calling appicon_paint_dock_dots again.
Reduce it to just wIconPaint(aicon->icon). Remove dead WS_INDICATOR
code (was #undef in wconfig.h).
This commit is contained in:
lkn 2026-06-21 19:00:46 +02:00
parent 162c0cc4ca
commit 69a57062b7
1 changed files with 0 additions and 34 deletions

View File

@ -349,44 +349,10 @@ void wAppIconMove(WAppIcon * aicon, int x, int y)
aicon->y_pos = y;
}
#ifdef WS_INDICATOR
static void updateDockNumbers(WScreen *scr)
{
int length;
char ws_numbers[20];
WAppIcon *dicon = scr->dock->icon_array[0];
snprintf(ws_numbers, sizeof(ws_numbers), "%i [ %i ]", scr->current_workspace + 1, ((scr->current_workspace / 10) + 1));
length = strlen(ws_numbers);
wm_backend->window_clear_area(dicon->icon->core->window, 2, 2, 50, 50);
WMDrawString(scr->wmscreen, dicon->icon->core->window, scr->black,
scr->icon_title_font, 4, 3, ws_numbers, length);
WMDrawString(scr->wmscreen, dicon->icon->core->window, scr->white,
scr->icon_title_font, 3, 2, ws_numbers, length);
}
#endif /* WS_INDICATOR */
void wAppIconPaint(WAppIcon *aicon)
{
WApplication *wapp;
WScreen *scr = aicon->icon->core->screen_ptr;
if (aicon->icon->owner)
wapp = wApplicationOf(aicon->icon->owner->main_window);
else
wapp = NULL;
wIconPaint(aicon->icon);
# ifdef WS_INDICATOR
if (aicon->docked && scr->dock && scr->dock == aicon->dock && aicon->yindex == 0)
updateDockNumbers(scr);
# endif
wm_backend->appicon_paint_dock_dots(aicon, wapp);
}
/* Save the application icon, if it's a dockapp then use it with dock = True */