From 6237a817b70c479e328d481225612e12107b7a28 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Sat, 30 Jun 2007 04:10:26 +0200 Subject: UPGRADE X11-Extras! Manage iconified windows darcs-hash:20070630021026-a5988-808741074e4132930b6036826d758b362c498dfc --- Main.hs | 7 ++++++- Operations.hs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Main.hs b/Main.hs index 64929c5..aa5561d 100644 --- a/Main.hs +++ b/Main.hs @@ -113,8 +113,13 @@ scan dpy rootw = do -- TODO: scan for windows that are either 'IsViewable' or where WM_STATE == -- Iconic where ok w = do wa <- getWindowAttributes dpy w + a <- internAtom dpy "WM_STATE" False + p <- getWindowProperty32 dpy a w + let ic = case p of + Just (3:_) -> True -- 3 for iconified + _ -> False return $ not (wa_override_redirect wa) - && wa_map_state wa == waIsViewable + && (wa_map_state wa == waIsViewable || ic) -- | Grab the keys back grabKeys :: Display -> Window -> IO () diff --git a/Operations.hs b/Operations.hs index ee5a5bc..5a1d1b5 100644 --- a/Operations.hs +++ b/Operations.hs @@ -48,7 +48,7 @@ import qualified Data.Traversable as T -- border set, and its event mask set. -- manage :: Window -> X () -manage w = withDisplay $ \d -> do +manage w = whenX (fmap not $ isClient w) $ withDisplay $ \d -> do setInitialProperties w >> reveal w -- FIXME: This is pretty awkward. We can't can't let "refresh" happen -- cgit v1.2.3