aboutsummaryrefslogtreecommitdiffstats
path: root/Operations.hs
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-07-24 16:13:10 +0200
committerDavid Roundy <droundy@darcs.net>2007-07-24 16:13:10 +0200
commit4fcba00eefa16fa92bdd96bc222edb30365a3784 (patch)
tree5965163c1a4c3ba8f6a8388e0646c5ee03aadc26 /Operations.hs
parentdeb5e4962590060bb798f79f58cd820aa632fb1f (diff)
downloadxmonad-4fcba00eefa16fa92bdd96bc222edb30365a3784.tar.gz
xmonad-4fcba00eefa16fa92bdd96bc222edb30365a3784.tar.xz
xmonad-4fcba00eefa16fa92bdd96bc222edb30365a3784.zip
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.gz
Diffstat (limited to 'Operations.hs')
-rw-r--r--Operations.hs6
1 files changed, 5 insertions, 1 deletions
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)