From b975c4728046052a32626378df193217a96fbefc Mon Sep 17 00:00:00 2001 From: Anselm R. Garbe Date: Sun, 19 Aug 2007 11:00:47 +0200 Subject: moved updatebarpos to screen --- screen.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'screen.c') diff --git a/screen.c b/screen.c index 03387eb..022633b 100644 --- a/screen.c +++ b/screen.c @@ -369,6 +369,32 @@ 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; -- cgit v1.2.3