mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
check if we're in the group already, else multiple calls to
group_movetogroup() on one client will still increment nhidden if the group is hidden. found the hard way by Thomas Jeunet and fix from Alexander Polakov - thanks to both! ok oga@
This commit is contained in:
parent
22c2bc618b
commit
fd9b83a232
4
group.c
4
group.c
@ -222,11 +222,13 @@ group_movetogroup(struct client_ctx *cc, int idx)
|
|||||||
err(1, "group_movetogroup: index out of range (%d)", idx);
|
err(1, "group_movetogroup: index out of range (%d)", idx);
|
||||||
|
|
||||||
gc = &sc->groups[idx];
|
gc = &sc->groups[idx];
|
||||||
|
if (cc->group == gc)
|
||||||
|
return;
|
||||||
if (gc->hidden) {
|
if (gc->hidden) {
|
||||||
client_hide(cc);
|
client_hide(cc);
|
||||||
gc->nhidden++;
|
gc->nhidden++;
|
||||||
}
|
}
|
||||||
group_add(&sc->groups[idx], cc);
|
group_add(gc, cc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user