Fix tag previews for leftlayout, was putting this off for a long time,
and I temporarily disabled it earlier.
This commit is contained in:
parent
45b593a9ca
commit
ea2c5f9c13
21
speedwm.c
21
speedwm.c
|
@ -1744,17 +1744,10 @@ expose(XEvent *e)
|
|||
void
|
||||
focus(Client *c)
|
||||
{
|
||||
if (!c || !ISVISIBLE(c))
|
||||
for (c = selmon->stack; c && (!ISVISIBLE(c) || HIDDEN(c)); c = c->snext);
|
||||
if (selmon->sel && selmon->sel != c) {
|
||||
if (!c || !ISVISIBLE(c) || HIDDEN(c))
|
||||
for (c = selmon->stack; c && (!ISVISIBLE(c) || HIDDEN(c)); c = c->snext);
|
||||
if (selmon->sel && selmon->sel != c)
|
||||
unfocus(selmon->sel, 0);
|
||||
if (selmon->hidsel) {
|
||||
//hidewin(selmon->sel);
|
||||
if (c)
|
||||
arrange(c->mon);
|
||||
selmon->hidsel = 0;
|
||||
}
|
||||
}
|
||||
if (c) {
|
||||
if (c->mon != selmon)
|
||||
selmon = c->mon;
|
||||
|
@ -2557,15 +2550,17 @@ motionnotify(XEvent *e)
|
|||
|
||||
for (c = selmon->clients; c; c = c->next)
|
||||
occ |= c->tags == 255 ? 0 : c->tags;
|
||||
do {
|
||||
if (leftlayout) {
|
||||
x += blw;
|
||||
} do {
|
||||
if (!(occ & 1 << i || selmon->tagset[selmon->seltags] & 1 << i))
|
||||
continue;
|
||||
|
||||
x += TEXTW(tags[i]);
|
||||
x += TEXTW(occ & 1 << i ? alttags[i] : tags[i]);
|
||||
|
||||
} while (ev->x >= x && ++i < (LENGTH(tags)));
|
||||
|
||||
if (!leftlayout && mousepreview && !hidetags) {
|
||||
if (mousepreview && !hidetags) {
|
||||
if (i < LENGTH(tags)) {
|
||||
if ((i + 1) != selmon->previewshow && !(selmon->tagset[selmon->seltags] & 1 << i)) {
|
||||
selmon->previewshow = i + 1;
|
||||
|
|
Loading…
Reference in a new issue