merge KBFLAG_NEEDCLIENT and MOUSEBIND_CTX_*; brings kbfunc and mousefunc

bits even closer.
This commit is contained in:
okan
2014-01-20 23:03:51 +00:00
parent 34f43e3f2d
commit c7adadaf9d
3 changed files with 58 additions and 74 deletions

View File

@@ -235,11 +235,11 @@ xev_handle_buttonpress(XEvent *ee)
if (mb == NULL)
return;
if (mb->flags == MOUSEBIND_CTX_WIN) {
if (mb->flags & CWM_WIN) {
if (((cc = client_find(e->window)) == NULL) &&
(cc = client_current()) == NULL)
return;
} else { /* (mb->flags == MOUSEBIND_CTX_ROOT) */
} else {
if (e->window != e->root)
return;
cc = &fakecc;
@@ -287,7 +287,7 @@ xev_handle_keypress(XEvent *ee)
if (kb == NULL)
return;
if (kb->flags & KBFLAG_NEEDCLIENT) {
if (kb->flags & CWM_WIN) {
if (((cc = client_find(e->window)) == NULL) &&
(cc = client_current()) == NULL)
return;