Fix and improve BAR_WINTITLEACTIONS_PATCH (#442)

Introduced an unhideall function that can be used to reveal all hidden client in the current view.

Added a change to unmanage to avoid changing the window state from IconicState to WithdrawnState when the window manager stops managing windows (which happens when restarting).

Previously a hidden window would disappear when restarting dwm because:
   - when hidden the window would be unmapped and having the window state of IconicState
   - when restarting the window would remain unmapped while the window state would become WithdrawnState
   - which would prevent the window from being picked up by the scan function when the window manager starts
This commit is contained in:
iokanto
2025-03-02 20:28:13 +03:00
committed by GitHub
parent 25134d69a9
commit fd6db40464
4 changed files with 16 additions and 1 deletions

3
dwm.c
View File

@@ -4572,7 +4572,8 @@ unmanage(Client *c, int destroyed)
XSelectInput(dpy, c->win, NoEventMask);
XConfigureWindow(dpy, c->win, CWBorderWidth, &wc); /* restore border */
XUngrabButton(dpy, AnyButton, AnyModifier, c->win);
setclientstate(c, WithdrawnState);
if (!HIDDEN(c))
setclientstate(c, WithdrawnState);
XSync(dpy, False);
XSetErrorHandler(xerror);
XUngrabServer(dpy);