Skip to content

Commit

Permalink
zoomswap: proposed changes to ensure that previous zooms references a…
Browse files Browse the repository at this point in the history
…re cleared when unmanaging a client ref. #324
  • Loading branch information
bakkeby committed Jan 13, 2023
1 parent 2a8e68c commit 6b7246c
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion dwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -4352,7 +4352,7 @@ unfocus(Client *c, int setfocus, Client *nextfocus)
void
unmanage(Client *c, int destroyed)
{
Monitor *m = c->mon;
Monitor *m;
#if SWITCHTAG_PATCH
unsigned int switchtag = c->switchtag;
#endif // SWITCHTAG_PATCH
Expand All @@ -4361,6 +4361,24 @@ unmanage(Client *c, int destroyed)
XkbInfo *xkb;
#endif // XKB_PATCH

#if ZOOMSWAP_PATCH
/* Make sure to clear any previous zoom references to the client being removed. */
#if PERTAG_PATCH
int i;
for (m = mons; m; m = m->next) {
for (i = 0; i <= NUMTAGS; i++) {
if (m->pertag->prevzooms[i] == c) {
m->pertag->prevzooms[i] = NULL;
}
}
}
#else
if (c == prevzoom)
prevzoom = NULL;
#endif // PERTAG_PATCH
#endif // ZOOMSWAP_PATCH
m = c->mon;

#if SWALLOW_PATCH
if (c->swallowing) {
unswallow(c);
Expand Down

0 comments on commit 6b7246c

Please sign in to comment.