summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Operations.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Operations.hs b/Operations.hs
index 370f066..952e5ac 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -244,8 +244,9 @@ rescreen = do
setButtonGrab :: Bool -> Window -> X ()
setButtonGrab grab w = withDisplay $ \d -> io $
if grab
- then grabButton d anyButton anyModifier w False buttonPressMask
- grabModeAsync grabModeSync none none
+ then flip mapM_ [button1, button2, button3] $ \b ->
+ grabButton d b anyModifier w False buttonPressMask
+ grabModeAsync grabModeSync none none
else ungrabButton d anyButton anyModifier w
-- ---------------------------------------------------------------------