Skip to content

Commit

Permalink
Avoid refresh for unmanaging clients when restarting or shutting down
Browse files Browse the repository at this point in the history
  • Loading branch information
natemaia committed Jul 14, 2024
1 parent 9e4aaaf commit ed38891
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/dk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2215,7 +2215,7 @@ void unmanage(xcb_window_t win, int destroyed)
{
Desk *d;
Panel *p;
Client *c, *s = NULL;
Client *c, *s;
void *ptr;

/* window we're handling is actually absorbed */
Expand All @@ -2233,7 +2233,9 @@ void unmanage(xcb_window_t win, int destroyed)
if ((s = absorbingclient(c->win))) {
free(s->absorbed);
s->absorbed = NULL;
refresh();
if (running) {
refresh();
}
return;
}
if (c->cb && running) {
Expand All @@ -2246,7 +2248,9 @@ void unmanage(xcb_window_t win, int destroyed)
DBG("unmanage: panel: 0x%08x %s", p->win, p->clss)
Panel **pp = &panels;
DETACH(p, pp);
updstruts();
if (running) {
updstruts();
}
} else if ((ptr = d = wintodesk(win))) {
DBG("unmanage: desktop: 0x%08x %s", d->win, d->clss)
Desk **dd = &desks;
Expand Down Expand Up @@ -2275,7 +2279,7 @@ void unmanage(xcb_window_t win, int destroyed)
if (ptr) {
free(ptr);
updatenetclients();
if (!s) {
if (running) {
refresh();
}
}
Expand Down

0 comments on commit ed38891

Please sign in to comment.