moved bar-related stuff to bar.c (merged draw.c into that)

This commit is contained in:
Anselm R. Garbe
2007-09-15 13:16:54 +02:00
parent 9800518ae3
commit 7e476fb86b
6 changed files with 269 additions and 259 deletions

@ -272,16 +272,6 @@ tag(const char *arg) {
arrange();
}
void
togglebar(const char *arg) {
if(bpos == BarOff)
bpos = (BARPOS == BarOff) ? BarTop : BARPOS;
else
bpos = BarOff;
updatebarpos();
arrange();
}
void
togglefloating(const char *arg) {
if(!sel)
@ -337,32 +327,6 @@ toggleview(const char *arg) {
arrange();
}
void
updatebarpos(void) {
XEvent ev;
wax = sx;
way = sy;
wah = sh;
waw = sw;
switch(bpos) {
default:
wah -= bh;
way += bh;
XMoveWindow(dpy, barwin, sx, sy);
break;
case BarBot:
wah -= bh;
XMoveWindow(dpy, barwin, sx, sy + wah);
break;
case BarOff:
XMoveWindow(dpy, barwin, sx, sy - bh);
break;
}
XSync(dpy, False);
while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
}
void
view(const char *arg) {
unsigned int i;