Selbar: Dynamic selbar position is back
This commit is contained in:
@@ -108,9 +108,6 @@ infobar_init(void)
|
||||
/* Selbar */
|
||||
if(conf.bars.selbar)
|
||||
{
|
||||
ib->selbar_geo.x = (conf.layout_placement
|
||||
? ib->tags_board->geo.x + ib->tags_board->geo.width + (PAD >> 1)
|
||||
: ib->layout_button->geo.x + ib->layout_button->geo.width + (PAD >> 1));
|
||||
ib->selbar_geo.y = 0;
|
||||
ib->selbar_geo.height = ib->geo.height;
|
||||
}
|
||||
@@ -230,6 +227,10 @@ infobar_draw_selbar(InfoBar *i)
|
||||
f = True;
|
||||
}
|
||||
|
||||
i->selbar_geo.x = (conf.layout_placement
|
||||
? i->tags_board->geo.x + i->tags_board->geo.width + (PAD >> 1)
|
||||
: i->layout_button->geo.x + i->layout_button->geo.width + (PAD >> 1));
|
||||
|
||||
XSetForeground(dpy, gc, conf.selbar.bg);
|
||||
XFillRectangle(dpy, i->bar->dr, gc, i->selbar_geo.x, 0, (i->selbar_geo.width = textw(str) + PAD), i->geo.height);
|
||||
draw_text(i->bar->dr, i->selbar_geo.x, FHINFOBAR - 1, conf.selbar.fg, str);
|
||||
|
||||
@@ -133,10 +133,12 @@ layoutswitch(bool b)
|
||||
}
|
||||
|
||||
ewmh_update_current_tag_prop();
|
||||
|
||||
tags[selscreen][seltag[selscreen]].flags |= CleanFactFlag;
|
||||
tags[selscreen][seltag[selscreen]].flags &= ~SplitFlag;
|
||||
|
||||
layout_func(selscreen, seltag[selscreen]);
|
||||
infobar_draw_layout(&infobar[selscreen]);
|
||||
infobar_draw(&infobar[selscreen]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user