From 5197d8daa2028b6627c6e6ae2f7087dfd853e3e6 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Wed, 7 Mar 2007 22:01:17 +0100 Subject: Manage windows that are created before thunk starts darcs-hash:20070307210117-a5988-f7aa8bb703df0ceedf7b3a8f1af78e26c43554c0 --- Main.hs | 4 ++++ 1 file changed, 4 insertions(+) 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 () -- cgit v1.2.3