summaryrefslogtreecommitdiffstats
path: root/Main.hs
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-05-27 09:21:06 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-05-27 09:21:06 +0200
commitf98c59dde19d47435837561cd199b5a773b6bf67 (patch)
treec68604f2f80452c99aefc2612383f311078646bb /Main.hs
parenta0cea74858d7b6a95a65312d8c590685949cf301 (diff)
downloadmetatile-f98c59dde19d47435837561cd199b5a773b6bf67.tar
metatile-f98c59dde19d47435837561cd199b5a773b6bf67.zip
clean Main.hs slightly
darcs-hash:20070527072106-9c5c1-48830bdd83fd4823fdabce0961dafb3bea416bf6
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/Main.hs b/Main.hs
index c2124e9..c1a8b48 100644
--- a/Main.hs
+++ b/Main.hs
@@ -80,6 +80,7 @@ main = do
mapM_ manage ws
-- main loop, for all you HOF/recursion fans out there.
forever $ handle =<< io (nextEvent dpy e >> getEvent e)
+
where forever a = a >> forever a
-- ---------------------------------------------------------------------
@@ -91,10 +92,10 @@ scan :: Display -> Window -> IO [Window]
scan dpy rootw = do
(_, _, ws) <- queryTree dpy rootw
filterM ok ws
- where
- ok w = do wa <- getWindowAttributes dpy w
- return $ not (wa_override_redirect wa)
- && wa_map_state wa == waIsViewable
+
+ where ok w = do wa <- getWindowAttributes dpy w
+ return $ not (wa_override_redirect wa)
+ && wa_map_state wa == waIsViewable
-- | Grab the keys back
grabKeys :: Display -> Window -> IO ()
@@ -106,8 +107,8 @@ grabKeys dpy rootw = do
-- XKeysymToKeycode() returns zero."
when (kc /= '\0') $ mapM_ (grab kc . (mask .|.)) $
[0, numlockMask, lockMask, numlockMask .|. lockMask]
- where
- grab kc m = grabKey dpy kc m rootw True grabModeAsync grabModeAsync
+
+ where grab kc m = grabKey dpy kc m rootw True grabModeAsync grabModeAsync
-- ---------------------------------------------------------------------
-- | Event handler. Map X events onto calls into Operations.hs, which