tmoved updatebarpos to screen - dwm - [fork] customized build of dwm, the dynam… | |
git clone git://src.adamsgaard.dk/dwm | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit b975c4728046052a32626378df193217a96fbefc | |
parent 47765f728614c348aa7dfc2eed6f754efc376922 | |
Author: Anselm R. Garbe <[email protected]> | |
Date: Sun, 19 Aug 2007 11:00:47 +0200 | |
moved updatebarpos to screen | |
Diffstat: | |
M dwm.h | 4 ++-- | |
M main.c | 26 -------------------------- | |
M screen.c | 26 ++++++++++++++++++++++++++ | |
3 files changed, 28 insertions(+), 28 deletions(-) | |
--- | |
diff --git a/dwm.h b/dwm.h | |
t@@ -117,8 +117,7 @@ void grabkeys(void); /* grab all ke… | |
/* main.c */ | |
Bool gettextprop(Window w, Atom atom, | |
char *text, unsigned int size); /* return text property, UTF-8… | |
-void updatebarpos(void); /* updates the bar position */ | |
-void quit(const char *arg); /* quit dwm nicely */ | |
+void quit(const char *arg); /* quit dwm nicely */ | |
int xerror(Display *dsply, XErrorEvent *ee); /* dwm's X error handler */ | |
/* screen.c */ | |
t@@ -142,6 +141,7 @@ void togglefloating(const char *arg); /* toggles se… | |
void togglemax(const char *arg); /* toggles maximization of floating cl… | |
void toggletag(const char *arg); /* toggles sel tags with arg's index */ | |
void toggleview(const char *arg); /* toggles the tag with arg's index (… | |
+void updatebarpos(void); /* updates the bar position */ | |
void view(const char *arg); /* views the tag with arg's index */ | |
/* util.c */ | |
diff --git a/main.c b/main.c | |
t@@ -253,32 +253,6 @@ quit(const char *arg) { | |
readin = running = False; | |
} | |
-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)); | |
-} | |
- | |
/* There's no way to check accesses to destroyed windows, thus those cases are | |
* ignored (especially on UnmapNotify's). Other types of errors call Xlibs | |
* default error handler, which may call exit. | |
diff --git a/screen.c b/screen.c | |
t@@ -370,6 +370,32 @@ toggleview(const char *arg) { | |
} | |
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; | |