From 735e4098b7d54dc248721a74873317e920b86d2b Mon Sep 17 00:00:00 2001 From: Martin Perner Date: Sat, 10 Sep 2011 16:02:49 +0200 Subject: 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. --- src/Main.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Main.hs') 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] -- cgit v1.2.3