mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-31 22:25:29 -04:00
opt: optimize prevtag set
This commit is contained in:
parent
fb58fe2f41
commit
32cf3c120c
1 changed files with 6 additions and 4 deletions
10
src/maomao.c
10
src/maomao.c
|
|
@ -6807,14 +6807,14 @@ void view_in_mon(const Arg *arg, bool want_animation, Monitor *m) {
|
|||
if (!m || (arg->ui != ~0 && m->isoverview)) {
|
||||
return;
|
||||
}
|
||||
if ((m->tagset[m->seltags] & arg->ui & TAGMASK) != 0) {
|
||||
want_animation = false;
|
||||
}
|
||||
// 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;
|
||||
m->pertag->prevtag = m->pertag->curtag;
|
||||
tmptag = m->pertag->curtag;
|
||||
|
||||
if (arg->ui == ~0)
|
||||
m->pertag->curtag = 0;
|
||||
|
|
@ -6823,6 +6823,8 @@ void view_in_mon(const Arg *arg, bool want_animation, Monitor *m) {
|
|||
;
|
||||
m->pertag->curtag = i + 1;
|
||||
}
|
||||
|
||||
m->pertag->prevtag = tmptag == m->pertag->curtag? m->pertag->prevtag:tmptag;
|
||||
} else {
|
||||
tmptag = m->pertag->prevtag;
|
||||
m->pertag->prevtag = m->pertag->curtag;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue