aboutsummaryrefslogtreecommitdiff
path: root/monsterwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'monsterwm.c')
-rw-r--r--monsterwm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/monsterwm.c b/monsterwm.c
index b6d71de..4673e84 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -1070,10 +1070,8 @@ void swap_master(void) {
*/
void switch_mode(const Arg *arg) {
Desktop *d = &desktops[currdeskidx];
- if (d->mode == arg->i && d->mode != FLOAT)
- for (Client *c = d->head; c; c = c->next) c->isfloat = False;
- if ((d->mode = arg->i) == FLOAT)
- for (Client *c = d->head; c; c = c->next) c->isfloat = True;
+ if (d->mode != arg->i) d->mode = arg->i;
+ else if (d->mode != FLOAT) for (Client *c = d->head; c; c = c->next) c->isfloat = False;
if (d->head) { tile(d); focus(d->curr, d); }
desktopinfo();
}