From db0be0ac576749bb15ee8f1d3f4bf0f2c6725fde Mon Sep 17 00:00:00 2001 From: Nikos Ntarmos Date: Mon, 7 Jan 2008 10:06:04 +0100 Subject: [PATCH] partial support for mouse bindings on root window when window displayed --- event.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/event.c b/event.c index 20d0c1ab5..0057d01c8 100644 --- a/event.c +++ b/event.c @@ -236,7 +236,7 @@ handle_event_enternotify(XEvent * e) int screen; Tag **curtags; - if(ev->mode != NotifyNormal || ev->detail == NotifyInferior) + if(ev->mode != NotifyNormal) return; if((c = get_client_bywin(globalconf.clients, ev->window)) && globalconf.screens[c->screen].sloppy_focus) { @@ -246,10 +246,13 @@ 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)) + window_grabbuttons(c->screen, c->win, False, False); + } } void