aboutsummaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <anselm@garbe.us>2010-03-31 23:24:22 +0100
committerAnselm R Garbe <anselm@garbe.us>2010-03-31 23:24:22 +0100
commitd6bdd03d915ecb800444986503b43aa488a82e36 (patch)
treebbf14fb2baa2460297abc904a8b8eea2145e5bbd /dwm.c
parent1144e983949878ea75e5d40e93b063ff7d1e1150 (diff)
downloaddwm-d6bdd03d915ecb800444986503b43aa488a82e36.tar
dwm-d6bdd03d915ecb800444986503b43aa488a82e36.tar.gz
dwm-d6bdd03d915ecb800444986503b43aa488a82e36.tar.bz2
it's debug season for upcoming dwm 5.8, so only use this if you really want to run experimental code or debug code
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/dwm.c b/dwm.c
index 32755cb..88d80b2 100644
--- a/dwm.c
+++ b/dwm.c
@@ -41,6 +41,7 @@
#endif /* XINERAMA */
/* macros */
+#define D if(1)
#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask)
#define CLEANMASK(mask) (mask & ~(numlockmask|LockMask))
#define INRECT(X,Y,RX,RY,RW,RH) ((X) >= (RX) && (X) < (RX) + (RW) && (Y) >= (RY) && (Y) < (RY) + (RH))
@@ -814,8 +815,8 @@ void
focus(Client *c) {
if(!c || !ISVISIBLE(c))
for(c = selmon->stack; c && !ISVISIBLE(c); c = c->snext);
- if(selmon->sel)
- unfocus(selmon->sel);
+// if(selmon->sel)
+// unfocus(selmon->sel);
if(c) {
if(c->mon != selmon)
selmon = c->mon;
@@ -1388,12 +1389,27 @@ restack(Monitor *m) {
void
run(void) {
XEvent ev;
-
+ static const char *evname[LASTEvent] = {
+ [ButtonPress] = "buttonpress",
+ [ConfigureRequest] = "configurerequest",
+ [ConfigureNotify] = "configurenotify",
+ [DestroyNotify] = "destroynotify",
+ [EnterNotify] = "enternotify",
+ [Expose] = "expose",
+ [FocusIn] = "focusin",
+ [KeyPress] = "keypress",
+ [MappingNotify] = "mappingnotify",
+ [MapRequest] = "maprequest",
+ [PropertyNotify] = "propertynotify",
+ [UnmapNotify] = "unmapnotify"
+ };
/* main event loop */
XSync(dpy, False);
- while(running && !XNextEvent(dpy, &ev))
+ while(running && !XNextEvent(dpy, &ev)) {
+ D fprintf(stderr, "run event %s\n", evname[ev.type]);
if(handler[ev.type])
handler[ev.type](&ev); /* call handler */
+ }
}
void