summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dwm.h4
-rw-r--r--main.c26
-rw-r--r--screen.c26
3 files changed, 28 insertions, 28 deletions
diff --git a/dwm.h b/dwm.h
index 105912f..0d55143 100644
--- a/dwm.h
+++ b/dwm.h
@@ -117,8 +117,7 @@ void grabkeys(void); /* grab all keys defined in config.h */
117/* main.c */ 117/* main.c */
118Bool gettextprop(Window w, Atom atom, 118Bool gettextprop(Window w, Atom atom,
119 char *text, unsigned int size); /* return text property, UTF-8 compliant */ 119 char *text, unsigned int size); /* return text property, UTF-8 compliant */
120void updatebarpos(void); /* updates the bar position */ 120void quit(const char *arg); /* quit dwm nicely */
121void quit(const char *arg); /* quit dwm nicely */
122int xerror(Display *dsply, XErrorEvent *ee); /* dwm's X error handler */ 121int xerror(Display *dsply, XErrorEvent *ee); /* dwm's X error handler */
123 122
124/* screen.c */ 123/* screen.c */
@@ -142,6 +141,7 @@ void togglefloating(const char *arg); /* toggles sel between floating/tiled stat
142void togglemax(const char *arg); /* toggles maximization of floating client */ 141void togglemax(const char *arg); /* toggles maximization of floating client */
143void toggletag(const char *arg); /* toggles sel tags with arg's index */ 142void toggletag(const char *arg); /* toggles sel tags with arg's index */
144void toggleview(const char *arg); /* toggles the tag with arg's index (in)visible */ 143void toggleview(const char *arg); /* toggles the tag with arg's index (in)visible */
144void updatebarpos(void); /* updates the bar position */
145void view(const char *arg); /* views the tag with arg's index */ 145void view(const char *arg); /* views the tag with arg's index */
146 146
147/* util.c */ 147/* util.c */
diff --git a/main.c b/main.c
index 35a3a78..b56e333 100644
--- a/main.c
+++ b/main.c
@@ -253,32 +253,6 @@ quit(const char *arg) {
253 readin = running = False; 253 readin = running = False;
254} 254}
255 255
256void
257updatebarpos(void) {
258 XEvent ev;
259
260 wax = sx;
261 way = sy;
262 wah = sh;
263 waw = sw;
264 switch(bpos) {
265 default:
266 wah -= bh;
267 way += bh;
268 XMoveWindow(dpy, barwin, sx, sy);
269 break;
270 case BarBot:
271 wah -= bh;
272 XMoveWindow(dpy, barwin, sx, sy + wah);
273 break;
274 case BarOff:
275 XMoveWindow(dpy, barwin, sx, sy - bh);
276 break;
277 }
278 XSync(dpy, False);
279 while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
280}
281
282/* There's no way to check accesses to destroyed windows, thus those cases are 256/* There's no way to check accesses to destroyed windows, thus those cases are
283 * ignored (especially on UnmapNotify's). Other types of errors call Xlibs 257 * ignored (especially on UnmapNotify's). Other types of errors call Xlibs
284 * default error handler, which may call exit. 258 * default error handler, which may call exit.
diff --git a/screen.c b/screen.c
index 03387eb..022633b 100644
--- a/screen.c
+++ b/screen.c
@@ -370,6 +370,32 @@ toggleview(const char *arg) {
370} 370}
371 371
372void 372void
373updatebarpos(void) {
374 XEvent ev;
375
376 wax = sx;
377 way = sy;
378 wah = sh;
379 waw = sw;
380 switch(bpos) {
381 default:
382 wah -= bh;
383 way += bh;
384 XMoveWindow(dpy, barwin, sx, sy);
385 break;
386 case BarBot:
387 wah -= bh;
388 XMoveWindow(dpy, barwin, sx, sy + wah);
389 break;
390 case BarOff:
391 XMoveWindow(dpy, barwin, sx, sy - bh);
392 break;
393 }
394 XSync(dpy, False);
395 while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
396}
397
398void
373view(const char *arg) { 399view(const char *arg) {
374 unsigned int i; 400 unsigned int i;
375 401