From c6eae4cb51073cfec1fde1bd6bd8f28a131a2ab4 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Sat, 29 Dec 2007 03:33:01 +0100 Subject: Make focus-follows-mouse configurable darcs-hash:20071229023301-a5988-7576eb2625061b2dcca3da69d1be4a1e50a76e71 --- XMonad/Main.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'XMonad/Main.hs') diff --git a/XMonad/Main.hs b/XMonad/Main.hs index 31dad6a..94a8a22 100644 --- a/XMonad/Main.hs +++ b/XMonad/Main.hs @@ -194,7 +194,8 @@ handle e@(ButtonEvent {ev_window = w,ev_event_type = t,ev_button = b }) -- entered a normal window, makes this focused. handle e@(CrossingEvent {ev_window = w, ev_event_type = t}) | t == enterNotify && ev_mode e == notifyNormal - && ev_detail e /= notifyInferior = focus w + && ev_detail e /= notifyInferior + = whenX (asks $ focusFollowsMouse . config) (focus w) -- left a window, check if we need to focus root handle e@(CrossingEvent {ev_event_type = t}) -- cgit v1.2.3