Fix-up a few simple uses of client_current(): check CLIENT_ACTIVE flag

instead of relying on curcc.
This commit is contained in:
okan
2016-09-14 19:45:33 +00:00
parent 9124a561e3
commit b8933ebcca
3 changed files with 14 additions and 11 deletions

View File

@ -250,10 +250,13 @@ xev_handle_buttonpress(XEvent *ee)
static void
xev_handle_buttonrelease(XEvent *ee)
{
struct client_ctx *cc;
XButtonEvent *e = &ee->xbutton;
struct client_ctx *cc;
if ((cc = client_current()) != NULL)
group_toggle_membership_leave(cc);
if ((cc = client_find(e->window)) != NULL) {
if (cc->flags & CLIENT_ACTIVE)
group_toggle_membership_leave(cc);
}
}
static void