181 void viewprevtag(const char *arg); /* views previous selected tags */ |
181 void viewprevtag(const char *arg); /* views previous selected tags */ |
182 int xerror(Display *dpy, XErrorEvent *ee); |
182 int xerror(Display *dpy, XErrorEvent *ee); |
183 int xerrordummy(Display *dpy, XErrorEvent *ee); |
183 int xerrordummy(Display *dpy, XErrorEvent *ee); |
184 int xerrorstart(Display *dpy, XErrorEvent *ee); |
184 int xerrorstart(Display *dpy, XErrorEvent *ee); |
185 void zoom(const char *arg); |
185 void zoom(const char *arg); |
186 void selectview(const char *arg); |
|
187 |
186 |
188 /* variables */ |
187 /* variables */ |
189 char stext[256], buf[256]; |
188 char stext[256], buf[256]; |
190 double mwfact; |
|
191 int screen, sx, sy, sw, sh; |
189 int screen, sx, sy, sw, sh; |
192 int (*xerrorxlib)(Display *, XErrorEvent *); |
190 int (*xerrorxlib)(Display *, XErrorEvent *); |
193 unsigned int bh, bpos; |
191 unsigned int bh, blw = 0; |
194 unsigned int blw = 0; |
|
195 unsigned int numlockmask = 0; |
192 unsigned int numlockmask = 0; |
196 void (*handler[LASTEvent]) (XEvent *) = { |
193 void (*handler[LASTEvent]) (XEvent *) = { |
197 [ButtonPress] = buttonpress, |
194 [ButtonPress] = buttonpress, |
198 [ConfigureRequest] = configurerequest, |
195 [ConfigureRequest] = configurerequest, |
199 [ConfigureNotify] = configurenotify, |
196 [ConfigureNotify] = configurenotify, |
360 XSync(dpy, False); |
357 XSync(dpy, False); |
361 } |
358 } |
362 |
359 |
363 void |
360 void |
364 cleanup(void) { |
361 cleanup(void) { |
365 |
|
366 close(STDIN_FILENO); |
362 close(STDIN_FILENO); |
367 while(stack) { |
363 while(stack) { |
368 unban(stack); |
364 unban(stack); |
369 unmanage(stack); |
365 unmanage(stack); |
370 } |
366 } |
371 if(dc.font.set) |
367 if(dc.font.set) |
372 XFreeFontSet(dpy, dc.font.set); |
368 XFreeFontSet(dpy, dc.font.set); |
373 else |
369 else |
374 XFreeFont(dpy, dc.font.xfont); |
370 XFreeFont(dpy, dc.font.xfont); |
375 |
|
376 XUngrabKey(dpy, AnyKey, AnyModifier, root); |
371 XUngrabKey(dpy, AnyKey, AnyModifier, root); |
377 XFreePixmap(dpy, dc.drawable); |
372 XFreePixmap(dpy, dc.drawable); |
378 XFreeGC(dpy, dc.gc); |
373 XFreeGC(dpy, dc.gc); |
379 XFreeCursor(dpy, cursor[CurNormal]); |
374 XFreeCursor(dpy, cursor[CurNormal]); |
380 XFreeCursor(dpy, cursor[CurResize]); |
375 XFreeCursor(dpy, cursor[CurResize]); |