x: use xcb constants in _x_strerror as mush as possible
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@ -100,6 +100,9 @@ static inline xcb_window_t attr_pure ev_window(session_t *ps, xcb_generic_event_
|
||||
}
|
||||
}
|
||||
|
||||
#define CASESTRRET(s) \
|
||||
case s: return #s;
|
||||
|
||||
static inline const char *ev_name(session_t *ps, xcb_generic_event_t *ev) {
|
||||
static char buf[128];
|
||||
switch (ev->response_type & 0x7f) {
|
||||
@ -162,6 +165,8 @@ static inline const char *attr_pure ev_focus_detail_name(xcb_focus_in_event_t *e
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
#undef CASESTRRET
|
||||
|
||||
static inline void ev_focus_in(session_t *ps, xcb_focus_in_event_t *ev) {
|
||||
log_debug("{ mode: %s, detail: %s }\n", ev_focus_mode_name(ev),
|
||||
ev_focus_detail_name(ev));
|
||||
|
Reference in New Issue
Block a user