Enable logging of state changes to stdout

This commit is contained in:
Don Stewart
2007-06-05 08:37:35 +00:00
parent 21e09361a6
commit 7ae7029b50
4 changed files with 13 additions and 4 deletions

View File

@@ -45,6 +45,7 @@ main = do
xinesc <- getScreenInfo dpy
nbc <- initcolor normalBorderColor
fbc <- initcolor focusedBorderColor
hSetBuffering stdout NoBuffering
args <- getArgs
let winset | ("--resume" : s : _) <- args
@@ -89,7 +90,7 @@ main = do
, w <- W.integrate (W.stack wk) ]
mapM_ manage ws -- find new windows
-- withWindowSet (io . hPrint stderr) -- uncomment for state logging
when logging $ withWindowSet (io . hPrint stdout)
-- main loop, for all you HOF/recursion fans out there.
forever $ handle =<< io (nextEvent dpy e >> getEvent e)