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 | accd7087733c335b47d1282e4e06307366d2e7e4 (patch) | |
tree | 8c88b56d941721fc63520c88caf6e617403b5735 /XMonad/Main.hsc | |
parent | 7b5a7a40fe9066122c0de2c8455becaa4621b868 (diff) | |
download | metatile-accd7087733c335b47d1282e4e06307366d2e7e4.tar metatile-accd7087733c335b47d1282e4e06307366d2e7e4.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
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 |