Fix hide* integers
This commit is contained in:
parent
dbd39a096b
commit
995dd8bfb8
23
speedwm.c
23
speedwm.c
|
@ -1019,9 +1019,11 @@ buttonpress(XEvent *e)
|
||||||
do {
|
do {
|
||||||
if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i))
|
if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i))
|
||||||
continue;
|
continue;
|
||||||
|
if (!hidetags)
|
||||||
x += TEXTW(occ & 1 << i ? usedtags[i] : tags[i]);
|
x += TEXTW(occ & 1 << i ? usedtags[i] : tags[i]);
|
||||||
|
|
||||||
} while (ev->x >= x && ++i < LENGTH(tags));
|
} while (ev->x >= x && ++i < LENGTH(tags));
|
||||||
if (i < LENGTH(tags)) {
|
if (i < LENGTH(tags) && !hidetags) {
|
||||||
selmon->mouseactivated = 1;
|
selmon->mouseactivated = 1;
|
||||||
click = ClkTagBar;
|
click = ClkTagBar;
|
||||||
arg.ui = 1 << i;
|
arg.ui = 1 << i;
|
||||||
|
@ -1052,6 +1054,10 @@ buttonpress(XEvent *e)
|
||||||
if (!leftlayout) {
|
if (!leftlayout) {
|
||||||
x += blw; // Left layout does not need this
|
x += blw; // Left layout does not need this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't click if title is hidden
|
||||||
|
// This is not required, but you won't be able to see what you're clicking so we might as well disable it
|
||||||
|
if (!hidetitle) {
|
||||||
c = m->clients;
|
c = m->clients;
|
||||||
|
|
||||||
if (c) {
|
if (c) {
|
||||||
|
@ -1067,6 +1073,7 @@ buttonpress(XEvent *e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else if ((c = wintoclient(ev->window))) {
|
} else if ((c = wintoclient(ev->window))) {
|
||||||
focus(c);
|
focus(c);
|
||||||
|
@ -1751,8 +1758,6 @@ drawbar(Monitor *m)
|
||||||
tw = statusw = m->ww - drawstatusbar(m, bh, stext);
|
tw = statusw = m->ww - drawstatusbar(m, bh, stext);
|
||||||
}
|
}
|
||||||
|
|
||||||
//x = 0;
|
|
||||||
|
|
||||||
for (text = s = stext; *s; s++) {
|
for (text = s = stext; *s; s++) {
|
||||||
if ((unsigned char)(*s) < ' ') {
|
if ((unsigned char)(*s) < ' ') {
|
||||||
ch = *s;
|
ch = *s;
|
||||||
|
@ -1770,7 +1775,7 @@ drawbar(Monitor *m)
|
||||||
if (ISVISIBLE(c))
|
if (ISVISIBLE(c))
|
||||||
n++;
|
n++;
|
||||||
occ |= c->tags;
|
occ |= c->tags;
|
||||||
if (c->isurgent)
|
if (c->isurgent && !hidetags)
|
||||||
urg |= c->tags;
|
urg |= c->tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1782,13 +1787,13 @@ drawbar(Monitor *m)
|
||||||
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
|
x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!hidetags) {
|
||||||
for (i = 0; i < LENGTH(tags); i++) {
|
for (i = 0; i < LENGTH(tags); i++) {
|
||||||
if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i))
|
if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i))
|
||||||
continue;
|
continue;
|
||||||
tagtext = occ & 1 << i ? usedtags[i] : tags[i];
|
|
||||||
if (!hidetags) {
|
if (!hidetags) {
|
||||||
|
tagtext = occ & 1 << i ? usedtags[i] : tags[i];
|
||||||
w = TEXTW(tagtext);
|
w = TEXTW(tagtext);
|
||||||
}
|
|
||||||
|
|
||||||
drw_setscheme(drw, (m->tagset[m->seltags] & 1 << i ? tagscheme[i] : scheme[SchemeTags]));
|
drw_setscheme(drw, (m->tagset[m->seltags] & 1 << i ? tagscheme[i] : scheme[SchemeTags]));
|
||||||
drw_text(drw, x, 0, w, bh, lrpad / 2, tagtext, urg & 1 << i);
|
drw_text(drw, x, 0, w, bh, lrpad / 2, tagtext, urg & 1 << i);
|
||||||
|
@ -1799,6 +1804,8 @@ drawbar(Monitor *m)
|
||||||
|
|
||||||
x += w;
|
x += w;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if LAYOUT_MONOCLE
|
#if LAYOUT_MONOCLE
|
||||||
if (monoclecount) {
|
if (monoclecount) {
|
||||||
|
@ -4834,10 +4841,11 @@ void
|
||||||
updatestatus(void)
|
updatestatus(void)
|
||||||
{
|
{
|
||||||
Monitor* m;
|
Monitor* m;
|
||||||
if (!gettextprop(root, XA_WM_NAME, rawstext, sizeof(rawstext))) {
|
if (!gettextprop(root, XA_WM_NAME, rawstext, sizeof(rawstext)) && !hidestatus) {
|
||||||
strcpy(stext, defaultname);
|
strcpy(stext, defaultname);
|
||||||
statusw = TEXTW(stext) - lrpad + 2;
|
statusw = TEXTW(stext) - lrpad + 2;
|
||||||
} else {
|
} else {
|
||||||
|
if (!hidestatus) {
|
||||||
copyvalidchars(stext, rawstext);
|
copyvalidchars(stext, rawstext);
|
||||||
char *text, *s, ch;
|
char *text, *s, ch;
|
||||||
statusw = 0;
|
statusw = 0;
|
||||||
|
@ -4852,6 +4860,7 @@ updatestatus(void)
|
||||||
}
|
}
|
||||||
statusw += TEXTW(text) - lrpad + 2;
|
statusw += TEXTW(text) - lrpad + 2;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (statusallmons) {
|
if (statusallmons) {
|
||||||
for(m = mons; m; m = m->next)
|
for(m = mons; m; m = m->next)
|
||||||
drawbar(m);
|
drawbar(m);
|
||||||
|
|
Loading…
Reference in a new issue