minor fix to view()
bf76cefe
1 file(s) · +6 −0
| 94 | 94 | Client *next; |
|
| 95 | 95 | Client *snext; |
|
| 96 | 96 | Window win; |
|
| 97 | + | void *aux; |
|
| 98 | + | void (*freeaux)(void *); |
|
| 97 | 99 | }; |
|
| 98 | 100 | ||
| 99 | 101 | typedef struct { |
|
| 1519 | 1521 | detachstack(c); |
|
| 1520 | 1522 | if(sel == c) |
|
| 1521 | 1523 | focus(NULL); |
|
| 1524 | + | if(c->aux && c->freeaux) |
|
| 1525 | + | c->freeaux(c->aux); |
|
| 1522 | 1526 | XUngrabButton(dpy, AnyButton, AnyModifier, c->win); |
|
| 1523 | 1527 | setclientstate(c, WithdrawnState); |
|
| 1524 | 1528 | free(c); |
|
| 1642 | 1646 | ||
| 1643 | 1647 | void |
|
| 1644 | 1648 | view(const Arg *arg) { |
|
| 1649 | + | if(arg && (arg->i & TAGMASK) == tagset[seltags]) |
|
| 1650 | + | return; |
|
| 1645 | 1651 | seltags ^= 1; /* toggle sel tagset */ |
|
| 1646 | 1652 | if(arg && (arg->ui & TAGMASK)) |
|
| 1647 | 1653 | tagset[seltags] = arg->i & TAGMASK; |
|