diff options
author | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2007-06-26 07:16:22 +0200 |
---|---|---|
committer | Andrea Rossato <andrea.rossato@ing.unitn.it> | 2007-06-26 07:16:22 +0200 |
commit | f081aaa45882887f6f21822bc2f90fb701b49257 (patch) | |
tree | dd0aa340f4e2de898f372c73afb1adce715471bf /xmobar.hs | |
parent | 290d6be9055c7e69b9b81bef50379b0da33b9129 (diff) | |
download | xmobar-f081aaa45882887f6f21822bc2f90fb701b49257.tar.gz xmobar-f081aaa45882887f6f21822bc2f90fb701b49257.tar.bz2 |
createWin will now return Xbar (Display, Window)
darcs-hash:20070626051622-d6583-b0ad139e4beab1e1f5b3c65c66eff8553420e22d.gz
Diffstat (limited to 'xmobar.hs')
-rw-r--r-- | xmobar.hs | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |