From a6098f6010c25f337ff0fc5ff55c273acad62089 Mon Sep 17 00:00:00 2001 From: Jason Creighton Date: Sat, 2 Jun 2007 05:26:05 +0000 Subject: [PATCH] only grab button{1,2,3} for click-to-focus (scrollwheel shouldn't focus) --- Operations.hs | 5 +++-- 1 file 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 -- ---------------------------------------------------------------------