aboutsummaryrefslogtreecommitdiffstats
path: root/StackSet.hs
diff options
context:
space:
mode:
authorKarsten Schoelzel <kuser@gmx.de>2007-09-27 15:42:05 +0200
committerKarsten Schoelzel <kuser@gmx.de>2007-09-27 15:42:05 +0200
commit6560b95d7b7b072eb0a35e1b0266732a0464997a (patch)
tree062fcf423b632df719ea737257c13ca793308f99 /StackSet.hs
parent429651a103a81ffe89525c7abc266b3a6ec48aad (diff)
downloadxmonad-6560b95d7b7b072eb0a35e1b0266732a0464997a.tar.gz
xmonad-6560b95d7b7b072eb0a35e1b0266732a0464997a.tar.xz
xmonad-6560b95d7b7b072eb0a35e1b0266732a0464997a.zip
document shiftWin
darcs-hash:20070927134205-eb3a1-4b38ee46bba8b1b268aadb1d4af303800c106c1a.gz
Diffstat (limited to 'StackSet.hs')
-rw-r--r--StackSet.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/StackSet.hs b/StackSet.hs
index 8e806d4..b9b1aa1 100644
--- a/StackSet.hs
+++ b/StackSet.hs
@@ -515,6 +515,12 @@ shift n s | n `tagMember` s && n /= curtag = maybe s go (peek s)
where go w = view curtag . insertUp w . view n . delete' w $ s
curtag = tag (workspace (current s))
+-- | /O(n)/. shiftWin. Searches for the specified window 'w' on all workspaces
+-- of the stackSet and moves it to stack 'n', leaving it as the focused
+-- element on that stack. The item is inserted above the currently
+-- focused element on that workspace.
+-- The actual focused workspace doesn't change. If the window is not
+-- found in the stackSet, the original stackSet is returned.
-- TODO how does this duplicate 'shift's behaviour?
shiftWin :: (Ord a, Eq a, Eq s, Eq i) => i -> a -> StackSet i a s sd -> StackSet i a s sd
shiftWin n w s | from == Nothing = s