Replaced custom forever_ by library function

This commit is contained in:
Daniel Schoepe
2009-01-14 21:55:56 +00:00
parent 8cd66aa380
commit 17799f131a

View File

@@ -155,12 +155,10 @@ xmonad initxmc = do
userCode $ startupHook initxmc
-- main loop, for all you HOF/recursion fans out there.
forever_ $ prehandle =<< io (nextEvent dpy e >> getEvent e)
forever $ prehandle =<< io (nextEvent dpy e >> getEvent e)
return ()
where
forever_ a = a >> forever_ a
-- if the event gives us the position of the pointer, set mousePosition
prehandle e = let mouse = do guard (ev_event_type e `elem` evs)
return (fromIntegral (ev_x_root e)