summaryrefslogtreecommitdiffstats
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
commitd7a6c9a01740065a3196536e0f94c022b701ea34 (patch)
tree062fcf423b632df719ea737257c13ca793308f99
parent4e091a99b29cb7fbd849c9f218c2d6075a831d29 (diff)
downloadmetatile-d7a6c9a01740065a3196536e0f94c022b701ea34.tar
metatile-d7a6c9a01740065a3196536e0f94c022b701ea34.zip
document shiftWin
darcs-hash:20070927134205-eb3a1-4b38ee46bba8b1b268aadb1d4af303800c106c1a
-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