From d7a2bd0029f841061819cbc8f3a124b94cdfd002 Mon Sep 17 00:00:00 2001 From: David Roundy Date: Tue, 24 Jul 2007 16:13:10 +0200 Subject: only display any given window once. This change goes along with the sticky window work. It makes xmonad display each window once and only once, with preference given to the focussed screen. It has no effect when there are no duplicate windows, except to make things less efficient. We could do better using Data.Set (or Data.Map) to store the set of windows that are visible. darcs-hash:20070724141310-72aca-aa02163e9375d7a7966c74c0a82d7b14c2b30e44 --- Operations.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Operations.hs b/Operations.hs index dce8195..5654505 100644 --- a/Operations.hs +++ b/Operations.hs @@ -141,13 +141,17 @@ windows f = do d <- asks display -- for each workspace, layout the currently visible workspaces - visible <- fmap concat $ forM (W.current ws : W.visible ws) $ \w -> do + let allscreens = W.current ws : W.visible ws + each_visible = map (W.integrate' . W.stack . W.workspace) allscreens + summed_visible = reverse $ foldl (\ (x:xs) y -> ((x++y):x:xs)) [[]] each_visible + visible <- fmap concat $ forM (zip allscreens summed_visible) $ \ (w, vis) -> do let n = W.tag (W.workspace w) this = W.view n ws Just l = fmap fst $ M.lookup n fls flt = filter (flip M.member (W.floating ws)) (W.index this) tiled = (W.stack . W.workspace . W.current $ this) >>= W.filter (not . flip M.member (W.floating ws)) + >>= W.filter (not . (`elem` vis)) (SD (Rectangle sx sy sw sh) (gt,gb,gl,gr)) = W.screenDetail w viewrect = Rectangle (sx + fromIntegral gl) (sy + fromIntegral gt) -- cgit v1.2.3