Skip to content

Commit

Permalink
Add swallow/window icon compatibility (#336)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
speedie1337 and speedie authored Feb 3, 2023
1 parent e424e87 commit e206d65
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions patch/swallow.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e206d65

Please sign in to comment.