dtwm: the desktop icons stay above the wallpaper
The wallpaper is a window of its own (WmBackdrop.c), and the icons are override-redirect windows. XLowerWindow on an icon put it *below* that window: the icon was mapped and invisible (measured 2026-11-22 on the MacBook, the icon windows were IsViewable at 1174,10 and 96x96, and the screen showed only the wallpaper). DeskMap lowers the backdrops after the icon now, so the order is root < wallpaper < icons < clients, as 4Dwm has it. Measured: make -C programs/dtwm rc=0, 0 errors (the MacBook build of this file, /tmp/dtwm-build7.log); the screenshot shows Computer, CD/DVD drive and Trash at 1174,10 / 1174,98 / 1174,186.
This commit is contained in:
1 parent
be056d34ee
commit
753c0f836e
1 file changed
+18
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user