diff options
author | Anselm R Garbe | 2010-03-31 23:24:22 +0100 |
---|---|---|
committer | Anselm R Garbe | 2010-03-31 23:24:22 +0100 |
commit | 40629581261dbe5e4ea23d9a6724837d8331128b (patch) | |
tree | 9f77629fc6a2178ef2239fd8d51f53efec9a3dfb /dwm.c | |
parent | 8e7902d7585e1bff71cb28c6035d320673be5f59 (diff) | |
download | aur-40629581261dbe5e4ea23d9a6724837d8331128b.tar.gz |
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.c | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -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 |