From e206d65f1e9c85005f290c9c2cddacf9079827b9 Mon Sep 17 00:00:00 2001 From: speedie1337 <71722170+speediegq@users.noreply.github.com> Date: Fri, 3 Feb 2023 21:04:00 +0100 Subject: [PATCH] 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 --- patch/swallow.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/patch/swallow.c b/patch/swallow.c index 955d748..8a63cc0 100644 --- a/patch/swallow.c +++ b/patch/swallow.c @@ -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);