diff --git a/programs/dtwm/WmMcdeDesktop.c b/programs/dtwm/WmMcdeDesktop.c index 43d840a2..a1bf1835 100644 --- a/programs/dtwm/WmMcdeDesktop.c +++ b/programs/dtwm/WmMcdeDesktop.c @@ -429,6 +429,23 @@ DeskWorkspaceIndex(WmScreenData *pSD) return (int) (pSD->pActiveWS - pSD->pWS); } +/* The wallpaper is a window of its own (WmBackdrop.c) and the icons are + * override-redirect windows, so XLowerWindow on an icon puts it *below* the + * wallpaper: the icon is there and invisible (measured 2026-11-22). Lower + * the backdrop first, then the icon sits above the wallpaper and below the + * clients -- the order 4Dwm has. */ +static void +DeskLowerBackdrops(void) +{ + int i; + + if (pSD == NULL) + return; + for (i = 0; i < pSD->numWorkspaces; i++) + if (pSD->pWS[i].backdrop.window != None) + XLowerWindow(deskDpy, pSD->pWS[i].backdrop.window); +} + static void DeskMap(int i) { @@ -450,6 +467,7 @@ DeskMap(int i) * manager. */ XMapWindow(deskDpy, it->win); XLowerWindow(deskDpy, it->win); + DeskLowerBackdrops(); } else XUnmapWindow(deskDpy, it->win); }