summaryrefslogtreecommitdiffstats
path: root/Main.hs
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-06-05 10:37:35 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-06-05 10:37:35 +0200
commit90d86554f871b740f6d8ce913bad5066f7aabb6b (patch)
tree14716a80ea1d19964d41a84b2d13bc2d19faf0b2 /Main.hs
parentf092ffd4bfdc0973db04808953405a5df892ec1d (diff)
downloadmetatile-90d86554f871b740f6d8ce913bad5066f7aabb6b.tar
metatile-90d86554f871b740f6d8ce913bad5066f7aabb6b.zip
Enable logging of state changes to stdout
darcs-hash:20070605083735-9c5c1-1ab5acbd611914caa7b5cdf1f2df338c0ee616f8
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Main.hs b/Main.hs
index 8c9b485..1b2e42f 100644
--- a/Main.hs
+++ b/Main.hs
@@ -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)