mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-12 13:30:01 -05:00
opt: fix tagsel toggle
This commit is contained in:
parent
38bb406279
commit
f0b2cba787
1 changed files with 13 additions and 4 deletions
17
src/mango.c
17
src/mango.c
|
|
@ -5021,7 +5021,7 @@ void toggleoverview(const Arg *arg) {
|
|||
visible_client_number++;
|
||||
}
|
||||
if (visible_client_number > 0) {
|
||||
target = ~0;
|
||||
target = ~0 & TAGMASK;
|
||||
} else {
|
||||
selmon->isoverview ^= 1;
|
||||
return;
|
||||
|
|
@ -5356,23 +5356,32 @@ void view_in_mon(const Arg *arg, bool want_animation, Monitor *m,
|
|||
bool changefocus) {
|
||||
unsigned int i, tmptag;
|
||||
|
||||
if (!m || (arg->ui != ~0 && m->isoverview)) {
|
||||
if (!m || (arg->ui != (~0 & TAGMASK) && m->isoverview)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg->ui == 0)
|
||||
if (arg->ui == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg->ui == UINT32_MAX) {
|
||||
m->pertag->prevtag = m->tagset[m->seltags];
|
||||
m->seltags ^= 1; /* toggle sel tagset */
|
||||
m->pertag->curtag = m->tagset[m->seltags];
|
||||
goto toggleseltags;
|
||||
}
|
||||
|
||||
if ((m->tagset[m->seltags] & arg->ui & TAGMASK) != 0) {
|
||||
want_animation = false;
|
||||
}
|
||||
|
||||
m->seltags ^= 1; /* toggle sel tagset */
|
||||
|
||||
if (arg->ui & TAGMASK) {
|
||||
m->tagset[m->seltags] = arg->ui & TAGMASK;
|
||||
tmptag = m->pertag->curtag;
|
||||
|
||||
if (arg->ui == ~0)
|
||||
if (arg->ui == (~0 & TAGMASK))
|
||||
m->pertag->curtag = 0;
|
||||
else {
|
||||
for (i = 0; !(arg->ui & 1 << i) && i < LENGTH(tags) && arg->ui != 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue