From 6fadbbfa541fa221f1ecd0c87e08a979b819185d Mon Sep 17 00:00:00 2001
From: Martin Perner <martin@perner.cc>
Date: Sat, 14 Jan 2012 19:42:55 +0100
Subject: [PATCH] Remove dependency for ghc's threaded runtime

---
 src/Xmobar.hs |    4 ++--
 xmobar.cabal  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Xmobar.hs b/src/Xmobar.hs
index a2f6062..2ea51ea 100644
--- a/src/Xmobar.hs
+++ b/src/Xmobar.hs
@@ -83,7 +83,7 @@ startLoop xcfg@(XConf _ _ w _ _) vs = do
     tv <- atomically $ newTVar []
     sig <- setupSignalHandler
     _ <- forkIO (checker tv [] vs sig `catch` \(SomeException _) -> putStrLn "Thread checker failed" >> return ())
-    _ <- forkOS (eventer sig `catch` \(SomeException _) -> putStrLn "Thread eventer failed" >> return ())
+    _ <- forkIO (eventer sig `catch` \(SomeException _) -> putStrLn "Thread eventer failed" >> return ())
     eventLoop tv xcfg sig
   where
     -- Reacts on events from X
@@ -101,7 +101,7 @@ startLoop xcfg@(XConf _ _ w _ _) vs = do
         xrrEventBase <- peek ptrEventBase
 
         forever $ do
-          nextEvent dpy e
+          nextEvent' dpy e
           ev <- getEvent e
           case ev of
             ConfigureEvent {} -> putMVar signal Reposition
diff --git a/xmobar.cabal b/xmobar.cabal
index 99a6beb..34fc73b 100644
--- a/xmobar.cabal
+++ b/xmobar.cabal
@@ -82,7 +82,7 @@ executable xmobar
     ghc-prof-options:   -prof -auto-all
 
     if true
-       ghc-options: -funbox-strict-fields -Wall -threaded
+       ghc-options: -funbox-strict-fields -Wall
        extra-libraries: Xrandr
 
     -- Use --disable-optimization configure flag
-- 
1.7.6.3

