Fix another bug.

This commit is contained in:
speediegq 2022-08-23 19:17:59 +02:00
parent 7b9f6ad9bf
commit a6819845af

View file

@ -173,6 +173,7 @@ struct Monitor {
int showbar;
int barposition;
int hidsel;
int mouseactivated;
Client *clients;
Client *sel;
Client *stack;
@ -892,6 +893,7 @@ if (!leftlayout) {
x += TEXTW(occ & 1 << i ? alttags[i] : tags[i]);
} while (ev->x >= x && ++i < LENGTH(tags));
if (i < LENGTH(tags)) {
selmon->mouseactivated = 1;
click = ClkTagBar;
arg.ui = 1 << i;
} else if (ev->x < x + blw)
@ -959,6 +961,7 @@ if (!leftlayout) {
x += TEXTW(occ & 1 << i ? alttags[i] : tags[i]);
} while (ev->x >= x && ++i < LENGTH(tags));
if (i < LENGTH(tags)) {
selmon->mouseactivated = 1;
click = ClkTagBar;
arg.ui = 1 << i;
} else if (ev->x > selmon->ww - statusw + lrpad - 2) {
@ -4832,9 +4835,16 @@ view(const Arg *arg)
int i;
unsigned int tmptag;
/* fix: tag preview gets captured in the next tag preview if the user switched tag while a preview is showing */
if (selmon->previewshow && !selmon->mouseactivated)
return;
XUnmapWindow(dpy, selmon->tagwin);
selmon->previewshow = 0;
if(arg->ui && (arg->ui & TAGMASK) == selmon->tagset[selmon->seltags])
return;
getpreview();
getpreview();
//selmon->seltags ^= 1; /* toggle sel tagset */
for (m = mons; m; m = m->next)
m->seltags ^= 1;
@ -4868,6 +4878,7 @@ view(const Arg *arg)
togglebar(NULL);
}
selmon->mouseactivated = 0;
focus(NULL);
arrange(NULL);
updatecurrentdesktop();