aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad
diff options
context:
space:
mode:
authorconrad.irwin <conrad.irwin@gmail.com>2011-05-25 06:34:13 +0200
committerconrad.irwin <conrad.irwin@gmail.com>2011-05-25 06:34:13 +0200
commit415f11d534bdcb3d380bb3148a17d691e542ba05 (patch)
tree986be5b125349bae5b9cbc7f6c2e8f379596ecd8 /XMonad
parent9edbb4daceee1bce66cf8c2e9ced1bd7ff0ac7a2 (diff)
downloadxmonad-415f11d534bdcb3d380bb3148a17d691e542ba05.tar.gz
xmonad-415f11d534bdcb3d380bb3148a17d691e542ba05.tar.xz
xmonad-415f11d534bdcb3d380bb3148a17d691e542ba05.zip
pass mouse clicks on to focused windows (experimental)
Ignore-this: 6b75b18b41e855a3f64a423b929a7282 Originally: http://www.haskell.org/pipermail/xmonad/2008-June/005807.html darcs-hash:20110525043413-8d3c4-53c2eae69ff246b869f4c5a617d9c0bba885f49f.gz
Diffstat (limited to 'XMonad')
-rw-r--r--XMonad/Main.hsc3
-rw-r--r--XMonad/Operations.hs2
2 files changed, 3 insertions, 2 deletions
diff --git a/XMonad/Main.hsc b/XMonad/Main.hsc
index 0d279f9..bd2ec0a 100644
--- a/XMonad/Main.hsc
+++ b/XMonad/Main.hsc
@@ -248,12 +248,13 @@ handle e@(ButtonEvent {ev_window = w,ev_event_type = t,ev_button = b })
| t == buttonPress = do
-- If it's the root window, then it's something we
-- grabbed in grabButtons. Otherwise, it's click-to-focus.
+ dpy <- asks display
isr <- isRoot w
m <- cleanMask $ ev_state e
mact <- asks (M.lookup (m, b) . buttonActions)
case mact of
(Just act) | isr -> act $ ev_subwindow e
- _ -> focus w
+ _ -> focus w >> io (allowEvents dpy replayPointer currentTime)
broadcastMessage e -- Always send button events.
-- entered a normal window: focus it if focusFollowsMouse is set to
diff --git a/XMonad/Operations.hs b/XMonad/Operations.hs
index 401a812..f2beea4 100644
--- a/XMonad/Operations.hs
+++ b/XMonad/Operations.hs
@@ -287,7 +287,7 @@ setButtonGrab grab w = withDisplay $ \d -> io $
if grab
then forM_ [button1, button2, button3] $ \b ->
grabButton d b anyModifier w False buttonPressMask
- grabModeAsync grabModeSync none none
+ grabModeSync grabModeSync none none
else ungrabButton d anyButton anyModifier w
-- ---------------------------------------------------------------------