diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2013-12-19 19:10:30 +0100 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2013-12-19 19:10:30 +0100 |
commit | 4b6e1519bccfb2d7acc904bd52985dedcbaef5b9 (patch) | |
tree | 3f3c16adb98b2d8875bac08e62ddfe72d90325b3 | |
parent | 2fda1546aa3569d4e611d4013bbd0f64c0f555f0 (diff) | |
download | XMonadContrib-4b6e1519bccfb2d7acc904bd52985dedcbaef5b9.tar.gz XMonadContrib-4b6e1519bccfb2d7acc904bd52985dedcbaef5b9.tar.xz XMonadContrib-4b6e1519bccfb2d7acc904bd52985dedcbaef5b9.zip |
fix -Wall ServerMode
Ignore-this: 708dd5fc60f43dee3d1da085002052f
darcs-hash:20131219181030-1499c-cdff20b6f4bda42242b5533a2c1f75e9ccd69d93.gz
-rw-r--r-- | XMonad/Hooks/ServerMode.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/XMonad/Hooks/ServerMode.hs b/XMonad/Hooks/ServerMode.hs index 4360b82..fe8a71c 100644 --- a/XMonad/Hooks/ServerMode.hs +++ b/XMonad/Hooks/ServerMode.hs @@ -130,7 +130,7 @@ serverModeEventHook = serverModeEventHook' defaultCommands serverModeEventHook' :: X [(String,X ())] -> Event -> X All serverModeEventHook' cmdAction ev = serverModeEventHookF "XMONAD_COMMAND" (sequence_ . map helper . words) ev where helper cmd = do cl <- cmdAction - case lookup cmd (zip (map show [1..]) cl) of + case lookup cmd (zip (map show [1 :: Integer ..]) cl) of Just (_,action) -> action Nothing -> mapM_ (io . hPutStrLn stderr) . listOfCommands $ cl listOfCommands cl = map (uncurry (++)) $ zip (map show ([1..] :: [Int])) $ map ((++) " - " . fst) cl @@ -162,9 +162,9 @@ serverModeEventHookCmd' cmdAction ev = serverModeEventHookF "XMONAD_COMMAND" (se serverModeEventHookF :: String -> (String -> X ()) -> Event -> X All serverModeEventHookF key func (ClientMessageEvent {ev_message_type = mt, ev_data = dt}) = do d <- asks display - a <- io $ internAtom d key False - when (mt == a && dt /= []) $ do - let atom = fromIntegral $ toInteger $ foldr1 (\a b -> a + (b*2^32)) dt + atm <- io $ internAtom d key False + when (mt == atm && dt /= []) $ do + let atom = fromIntegral $ toInteger $ foldr1 (\a b -> a + (b*2^(32::Int))) dt cmd <- io $ getAtomName d atom case cmd of Just command -> func command |