cvsimport

This commit is contained in:
okan
2013-07-10 14:15:58 +00:00
10 changed files with 143 additions and 127 deletions

View File

@@ -238,12 +238,8 @@ xev_handle_buttonpress(XEvent *ee)
{
XButtonEvent *e = &ee->xbutton;
struct client_ctx *cc, fakecc;
struct screen_ctx *sc;
struct mousebinding *mb;
sc = screen_fromroot(e->root);
cc = client_find(e->window);
e->state &= ~IGNOREMODMASK;
TAILQ_FOREACH(mb, &Conf.mousebindingq, entry) {
@@ -253,13 +249,16 @@ xev_handle_buttonpress(XEvent *ee)
if (mb == NULL)
return;
if (mb->context == MOUSEBIND_CTX_ROOT) {
if (e->window != sc->rootwin)
if (mb->flags == MOUSEBIND_CTX_WIN) {
if (((cc = client_find(e->window)) == NULL) &&
(cc = client_current()) == NULL)
return;
} else { /* (mb->flags == MOUSEBIND_CTX_ROOT) */
if (e->window != e->root)
return;
cc = &fakecc;
cc->sc = screen_fromroot(e->window);
} else if (cc == NULL) /* (mb->context == MOUSEBIND_CTX_WIN */
return;
}
(*mb->callback)(cc, e);
}
@@ -357,7 +356,7 @@ xev_handle_clientmessage(XEvent *ee)
client_send_delete(cc);
if (e->message_type == ewmh[_NET_ACTIVE_WINDOW].atom &&
e->format == 32) {
e->format == 32) {
old_cc = client_current();
if (old_cc)
client_ptrsave(old_cc);