Add swallow/window icon compatibility (#336)

* Add swallow/window icon compatibility. Without this, after a client is
swallowed the old icon (usually from the terminal emulator) is
preserved. This is noticeable if you, say run `mpv` from a terminal
emulator which is a common use case.

---------

Co-authored-by: speedie <speedie@duck.com>
This commit is contained in:
speedie1337 2023-02-03 21:04:00 +01:00 committed by GitHub
parent e424e87c40
commit e206d65f1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,6 +37,9 @@ swallow(Client *p, Client *c)
XChangeProperty(dpy, c->win, netatom[NetClientList], XA_WINDOW, 32, PropModeReplace,
(unsigned char *) &(p->win), 1);
#if BAR_WINICON_PATCH
updateicon(p);
#endif
updatetitle(p);
s = scanner ? c : p;
#if BAR_EWMHTAGS_PATCH
@ -70,6 +73,9 @@ unswallow(Client *c)
/* unfullscreen the client */
setfullscreen(c, 0);
#if BAR_WINICON_PATCH
updateicon(c);
#endif
updatetitle(c);
arrange(c->mon);
XMapWindow(dpy, c->win);