From 4f1940d94f0a7449a8bdc81ac66a58a7ef0de815 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 11 Oct 2007 11:41:40 +0200 Subject: [PATCH] only focus if new entered windows in != than currently focused --- event.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/event.c b/event.c index 10706f537..dd66d2770 100644 --- a/event.c +++ b/event.c @@ -349,9 +349,12 @@ handle_event_enternotify(XEvent * e, awesome_config *awesomeconf) return; if((c = getclient(ev->window))) { - focus(c->display, c, ev->same_screen, &awesomeconf[c->screen]); - if (sel && (sel->isfloating || IS_ARRANGE(sel->screen, layout_floating))) - grabbuttons(sel, True, False, awesomeconf->modkey, awesomeconf->numlockmask); + if(!sel || sel != c) + { + focus(c->display, c, ev->same_screen, &awesomeconf[c->screen]); + if (sel && (sel->isfloating || IS_ARRANGE(sel->screen, layout_floating))) + grabbuttons(sel, True, False, awesomeconf->modkey, awesomeconf->numlockmask); + } } else for(screen = 0; screen < ScreenCount(e->xany.display); screen++)