summaryrefslogtreecommitdiffstats
path: root/StackSet.hs
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-05-31 10:53:08 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-05-31 10:53:08 +0200
commit101004dd9f0526d12398e42d26b8d6bc5a57812b (patch)
tree13d75cb23a8fd544bb794c52fcfa6f3a89f121e9 /StackSet.hs
parent3de7f66af861fe0842fdcea4a36a7ce379b8ef8c (diff)
downloadmetatile-101004dd9f0526d12398e42d26b8d6bc5a57812b.tar
metatile-101004dd9f0526d12398e42d26b8d6bc5a57812b.zip
clean up mouse code a bit
darcs-hash:20070531085308-9c5c1-73ed940708aa9a369b0345c0d2b2a4708a231e67
Diffstat (limited to 'StackSet.hs')
-rw-r--r--StackSet.hs13
1 files changed, 8 insertions, 5 deletions
diff --git a/StackSet.hs b/StackSet.hs
index 810fa60..7374da3 100644
--- a/StackSet.hs
+++ b/StackSet.hs
@@ -78,7 +78,7 @@ module StackSet (
StackSet(..), Workspace(..), Screen(..), Stack(..), RationalRect(..),
new, view, lookupWorkspace, peek, index, focusUp, focusDown,
focusWindow, member, findIndex, insertUp, delete, shift,
- swapMaster, swapUp, swapDown, modify, makeFloating, clearFloating -- needed by users
+ swapMaster, swapUp, swapDown, modify, float, sink -- needed by users
) where
import Data.Maybe (listToMaybe)
@@ -371,11 +371,14 @@ delete w s | Just w == peek s = remove s -- common case.
Node _ [] [] -> Empty
else c { up = w `L.delete` up c, down = w `L.delete` down c }
-makeFloating :: Ord a => a -> RationalRect -> StackSet i a s -> StackSet i a s
-makeFloating w r s = s { floating = M.insert w r (floating s) }
+-- | Given a window, and its preferred rectangle, set it as floating
+-- A floating window should already be managed by the StackSet.
+float :: Ord a => a -> RationalRect -> StackSet i a s -> StackSet i a s
+float w r s = s { floating = M.insert w r (floating s) }
-clearFloating :: Ord a => a -> StackSet i a s -> StackSet i a s
-clearFloating w s = s { floating = M.delete w (floating s) }
+-- | Clear the floating status of a window
+sink :: Ord a => a -> StackSet i a s -> StackSet i a s
+sink w s = s { floating = M.delete w (floating s) }
------------------------------------------------------------------------
-- Setting the master window