opt: dont apply viewback dispatch when no tag change

This commit is contained in:
DreamMaoMao 2026-04-21 09:13:27 +08:00
parent 700a5c452b
commit 60f31cd1bf

View file

@ -6317,10 +6317,14 @@ void view_in_mon(const Arg *arg, bool want_animation, Monitor *m,
} }
if (arg->ui == UINT32_MAX) { if (arg->ui == UINT32_MAX) {
if (m->tagset[0] != m->tagset[1]) {
m->pertag->prevtag = get_tags_first_tag_num(m->tagset[m->seltags]); m->pertag->prevtag = get_tags_first_tag_num(m->tagset[m->seltags]);
m->seltags ^= 1; /* toggle sel tagset */ m->seltags ^= 1; /* toggle sel tagset */
m->pertag->curtag = get_tags_first_tag_num(m->tagset[m->seltags]); m->pertag->curtag = get_tags_first_tag_num(m->tagset[m->seltags]);
goto toggleseltags; goto toggleseltags;
} else {
return;
}
} }
if ((m->tagset[m->seltags] & arg->ui & TAGMASK) != 0) { if ((m->tagset[m->seltags] & arg->ui & TAGMASK) != 0) {