summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Main.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Main.hs b/Main.hs
index e66ee69..8a4bbd4 100644
--- a/Main.hs
+++ b/Main.hs
@@ -77,6 +77,10 @@ main = do
io $ do selectInput dpy r (substructureRedirectMask .|. substructureNotifyMask)
sync dpy False
registerKeys dpy r
+ (_, _, ws) <- io $ queryTree dpy r
+ forM_ ws $ \w -> do
+ wa <- io $ getWindowAttributes dpy w
+ when (waMapState wa == waIsViewable) (manage w)
go dpy
return ()