diff --git a/client.c b/client.c index f8607dd6..8e8ce99b 100644 --- a/client.c +++ b/client.c @@ -598,7 +598,6 @@ client_unmanage(Client *c) if(globalconf.focus->client == c) focus(NULL, True, c->screen); - XUngrabButton(globalconf.display, AnyButton, AnyModifier, c->win); window_setstate(c->win, WithdrawnState); diff --git a/event.c b/event.c index 878e25fe..09a02f9e 100644 --- a/event.c +++ b/event.c @@ -247,11 +247,12 @@ handle_event_enternotify(XEvent * e) window_grabbuttons(get_phys_screen(c->screen), c->win, True, False); p_delete(&curtags); } - else { + else + { for(screen = 0; screen < ScreenCount(e->xany.display); screen++) if(ev->window == RootWindow(e->xany.display, screen)) focus(NULL, True, screen); - if ((c = globalconf.focus->client)) + if((c = globalconf.focus->client)) window_grabbuttons(c->screen, c->win, False, False); } }