summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2007-10-27 13:09:32 +0200
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2007-10-27 13:09:32 +0200
commit105da44b55eca8b872fb892d41bf66deb391b76c (patch)
treea56bf64c654fff6770ffb0bd8859b40d07bb0c46
parente22c89eadc72c8b294536421fce7ca940f969e50 (diff)
downloadxmobar-105da44b55eca8b872fb892d41bf66deb391b76c.tar.gz
xmobar-105da44b55eca8b872fb892d41bf66deb391b76c.tar.bz2
Main will now open the connection with the X server
darcs-hash:20071027110932-d6583-621b580c6fffcc889489186a0f030f9f39b0500d.gz
-rw-r--r--Main.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Main.hs b/Main.hs
index 3bd20ff..d94be69 100644
--- a/Main.hs
+++ b/Main.hs
@@ -24,6 +24,7 @@ import Parsers
import Config
import Data.IORef
+import Graphics.X11.Xlib
import System.Console.GetOpt
import System.Exit
import System.Environment
@@ -34,6 +35,7 @@ import System.Posix.Files
-- | The main entry point
main :: IO ()
main = do
+ d <- openDisplay ""
args <- getArgs
(o,file) <- getOpts args
c <- case file of
@@ -44,7 +46,7 @@ main = do
conf <- readIORef civ
cl <- parseTemplate conf (template conf)
vars <- mapM startCommand cl
- (d,w) <- createWin conf
+ w <- createWin d conf
eventLoop conf vars d w
-- | Reads the configuration files or quits with an error