diff options
author | MC <mc@hack.org> | 2010-06-24 17:28:16 +0200 |
---|---|---|
committer | MC <mc@hack.org> | 2010-06-24 17:28:16 +0200 |
commit | d6ed181eee6f2dd3439e0e6057c868c2d5d4a8d0 (patch) | |
tree | ccb10065d6a039f3371139906a518ca6f44e6903 /mcwm.c | |
parent | 9b89fb40a58caed77c53732eb440db936592a837 (diff) | |
download | mcwm-d6ed181eee6f2dd3439e0e6057c868c2d5d4a8d0.zip |
Added debug printouts for incoming events.
Diffstat (limited to 'mcwm.c')
-rw-r--r-- | mcwm.c | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -40,6 +40,10 @@ #include <X11/keysym.h> +#ifdef DEBUG +#include "events.h" +#endif + /* Check here for user configurable parts: */ #include "config.h" @@ -1124,8 +1128,17 @@ void events(void) fprintf(stderr, "mcwm: Couldn't get event. Exiting...\n"); exit(1); } - - PDEBUG("Event: %d\n", ev->response_type); + +#ifdef DEBUG + if (ev->response_type <= MAXEVENTS) + { + PDEBUG("Event: %s\n", evnames[ev->response_type]); + } + else + { + PDEBUG("Event: #%d. Not known.\n", ev->response_type); + } +#endif switch (ev->response_type & ~0x80) { @@ -1344,7 +1357,6 @@ void events(void) if (e->mode == XCB_NOTIFY_MODE_NORMAL || e->mode == XCB_NOTIFY_MODE_UNGRAB) { - /* * If we're entering the same window we focus now, * then don't bother focusing. |