summaryrefslogtreecommitdiffhomepage
path: root/src/Main.hs
diff options
context:
space:
mode:
authorMartin Perner <martin@perner.cc>2011-09-10 16:02:49 +0200
committerMartin Perner <martin@perner.cc>2011-09-10 17:29:55 +0200
commit735e4098b7d54dc248721a74873317e920b86d2b (patch)
tree1970cbf340797d5c59ffdaa3137d0063c144ad2f /src/Main.hs
parentdbf4ea77dc318f5d3b68651eabc562cd6cefec51 (diff)
downloadxmobar-735e4098b7d54dc248721a74873317e920b86d2b.tar.gz
xmobar-735e4098b7d54dc248721a74873317e920b86d2b.tar.bz2
removed threading problem with Xlib
The output just stopped at some point until a new XEvent was received As XLockDisplay is in theory a good idea, with XNextEvent blocking its not usable. As it turned out, a window can be shared between display connections. Now the eventloop has its own display connection (which also removes the need for the lock introduced before). Additionally the screeninfo doesn't need to be fetched into a TVar in the eventerloop anymore. Also this was needed for the signalHandlers to work correctly again.
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 34a298d..0d4c113 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -56,9 +56,9 @@ main = do
fs <- initFont d (font conf)
cls <- mapM (parseTemplate conf) (splitTemplate conf)
vars <- mapM (mapM startCommand) cls
- (r,w, srs) <- createWin d fs conf
+ (r,w) <- createWin d fs conf
sig <- setupSignalHandler
- eventLoop (XConf d r w fs conf) vars sig srs
+ eventLoop (XConf d r w fs conf) vars sig
-- | Splits the template in its parts
splitTemplate :: Config -> [String]