summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2007-06-26 07:16:22 +0200
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2007-06-26 07:16:22 +0200
commitf081aaa45882887f6f21822bc2f90fb701b49257 (patch)
treedd0aa340f4e2de898f372c73afb1adce715471bf
parent290d6be9055c7e69b9b81bef50379b0da33b9129 (diff)
downloadxmobar-f081aaa45882887f6f21822bc2f90fb701b49257.tar.gz
xmobar-f081aaa45882887f6f21822bc2f90fb701b49257.tar.bz2
createWin will now return Xbar (Display, Window)
darcs-hash:20070626051622-d6583-b0ad139e4beab1e1f5b3c65c66eff8553420e22d.gz
-rw-r--r--xmobar.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/xmobar.hs b/xmobar.hs
index 46edfcf..1c40497 100644
--- a/xmobar.hs
+++ b/xmobar.hs
@@ -137,17 +137,17 @@ eventLoop (d,w) =
eventLoop (d,w)
-- | The function to create the initial window
-createWin :: Config -> IO (Display, Window)
+createWin :: Config -> Xbar (Display, Window)
createWin config =
- do dpy <- openDisplay ""
+ do dpy <- io $ openDisplay ""
let dflt = defaultScreen dpy
- rootw <- rootWindow dpy dflt
- win <- mkUnmanagedWindow dpy (defaultScreenOfDisplay dpy) rootw
+ rootw <- io $ rootWindow dpy dflt
+ win <- io $ mkUnmanagedWindow dpy (defaultScreenOfDisplay dpy) rootw
(fromIntegral $ xPos config)
(fromIntegral $ yPos config)
(fromIntegral $ width config)
(fromIntegral $ hight config)
- mapWindow dpy win
+ io $ mapWindow dpy win
return (dpy,win)
-- | Draws in and updates the window