From f081aaa45882887f6f21822bc2f90fb701b49257 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Tue, 26 Jun 2007 07:16:22 +0200 Subject: createWin will now return Xbar (Display, Window) darcs-hash:20070626051622-d6583-b0ad139e4beab1e1f5b3c65c66eff8553420e22d.gz --- xmobar.hs | 10 +++++----- 1 file 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 -- cgit v1.2.3