From 9360efb89e7ab170df115a2cb8cad01a7c11c441 Mon Sep 17 00:00:00 2001 From: Nikos Ntarmos Date: Tue, 16 Oct 2007 02:24:04 +0300 Subject: [PATCH] fix click-to-raise feature --- client.c | 8 +------- event.c | 3 ++- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/client.c b/client.c index 8f6c9c78..a5f5fd6e 100644 --- a/client.c +++ b/client.c @@ -50,13 +50,7 @@ grabbuttons(Client * c, Bool focused, Bool raised, KeySym modkey, unsigned int n if(!raised) { XGrabButton(c->display, Button1, NoSymbol, c->win, False, - ButtonPressMask, GrabModeAsync, GrabModeSync, None, None); - XGrabButton(c->display, Button1, LockMask, c->win, False, - ButtonPressMask, GrabModeAsync, GrabModeSync, None, None); - XGrabButton(c->display, Button1, numlockmask, c->win, False, - ButtonPressMask, GrabModeAsync, GrabModeSync, None, None); - XGrabButton(c->display, Button1, numlockmask | LockMask, c->win, False, - ButtonPressMask, GrabModeAsync, GrabModeSync, None, None); + BUTTONMASK, GrabModeSync, GrabModeAsync, None, None); } XGrabButton(c->display, Button1, modkey, c->win, False, BUTTONMASK, diff --git a/event.c b/event.c index 4bd121e6..5ebc72d2 100644 --- a/event.c +++ b/event.c @@ -197,6 +197,7 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf) if((c = get_client_bywin(awesomeconf->clients, ev->window))) { + XAllowEvents(c->display, ReplayPointer, CurrentTime); focus(c, ev->same_screen, &awesomeconf[c->screen]); if(CLEANMASK(ev->state, c->screen) != awesomeconf[c->screen].modkey) { @@ -233,7 +234,7 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf) uicb_settrans(&awesomeconf[c->screen], "+5"); else if(ev->button == Button5) uicb_settrans(&awesomeconf[c->screen], "-5"); - } + } else if(!*awesomeconf->client_sel) for(screen = 0; screen < ScreenCount(e->xany.display); screen++) if(RootWindow(e->xany.display, screen) == ev->window