summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Creighton <jcreigh@gmail.com>2007-06-02 07:26:05 +0200
committerJason Creighton <jcreigh@gmail.com>2007-06-02 07:26:05 +0200
commit3bb48432f5ef32c797af466c4af2e851a1b6d5d3 (patch)
tree9f44ccc03b37d0b5bd17b981c6ceb20877256c82
parent352226ebeeaa846238f8ce8799479b46848a5019 (diff)
downloadmetatile-3bb48432f5ef32c797af466c4af2e851a1b6d5d3.tar
metatile-3bb48432f5ef32c797af466c4af2e851a1b6d5d3.zip
only grab button{1,2,3} for click-to-focus (scrollwheel shouldn't focus)
darcs-hash:20070602052605-b9aa7-a3aa510c7d439b3169757f644c92107250d8db94
-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
-- ---------------------------------------------------------------------