diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2012-01-03 02:39:16 +0100 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2012-01-03 02:39:16 +0100 |
commit | 6fd5a380b46edd755118bfe385a99609c2b7c142 (patch) | |
tree | 8c88b56d941721fc63520c88caf6e617403b5735 /XMonad/Main.hsc | |
parent | 415f11d534bdcb3d380bb3148a17d691e542ba05 (diff) | |
download | xmonad-6fd5a380b46edd755118bfe385a99609c2b7c142.tar.gz xmonad-6fd5a380b46edd755118bfe385a99609c2b7c142.tar.xz xmonad-6fd5a380b46edd755118bfe385a99609c2b7c142.zip |
Add configuration option clickToFocus (issue 225)
Ignore-this: 78961f6256e1a1ee25c085e9056af758
To summarize this allows clicks which change the focus to also be passed on to
that window.
darcs-hash:20120103013916-1499c-1c29f13f0565f4812cf5787caefb6142882f25b5.gz
Diffstat (limited to 'XMonad/Main.hsc')
-rw-r--r-- | XMonad/Main.hsc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/XMonad/Main.hsc b/XMonad/Main.hsc index bd2ec0a..c459f14 100644 --- a/XMonad/Main.hsc +++ b/XMonad/Main.hsc @@ -253,8 +253,11 @@ handle e@(ButtonEvent {ev_window = w,ev_event_type = t,ev_button = b }) m <- cleanMask $ ev_state e mact <- asks (M.lookup (m, b) . buttonActions) case mact of - (Just act) | isr -> act $ ev_subwindow e - _ -> focus w >> io (allowEvents dpy replayPointer currentTime) + Just act | isr -> act $ ev_subwindow e + _ -> do + focus w + ctf <- asks (clickJustFocuses . config) + unless ctf $ io (allowEvents dpy replayPointer currentTime) broadcastMessage e -- Always send button events. -- entered a normal window: focus it if focusFollowsMouse is set to |