UPGRADE X11-Extras! Manage iconified windows

This commit is contained in:
Spencer Janssen
2007-06-30 02:10:26 +00:00
parent ab830ec227
commit e74e8050d0
2 changed files with 7 additions and 2 deletions

View File

@@ -113,8 +113,13 @@ scan dpy rootw = do
-- TODO: scan for windows that are either 'IsViewable' or where WM_STATE == -- TODO: scan for windows that are either 'IsViewable' or where WM_STATE ==
-- Iconic -- Iconic
where ok w = do wa <- getWindowAttributes dpy w 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) return $ not (wa_override_redirect wa)
&& wa_map_state wa == waIsViewable && (wa_map_state wa == waIsViewable || ic)
-- | Grab the keys back -- | Grab the keys back
grabKeys :: Display -> Window -> IO () grabKeys :: Display -> Window -> IO ()

View File

@@ -48,7 +48,7 @@ import qualified Data.Traversable as T
-- border set, and its event mask set. -- border set, and its event mask set.
-- --
manage :: Window -> X () manage :: Window -> X ()
manage w = withDisplay $ \d -> do manage w = whenX (fmap not $ isClient w) $ withDisplay $ \d -> do
setInitialProperties w >> reveal w setInitialProperties w >> reveal w
-- FIXME: This is pretty awkward. We can't can't let "refresh" happen -- FIXME: This is pretty awkward. We can't can't let "refresh" happen