summaryrefslogtreecommitdiffstats
path: root/XMonad.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-06-20 17:08:58 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-06-20 17:08:58 +0200
commitd5ef958f82520a392c77ace3df5ea398c133b81c (patch)
tree51cfefc2621c661773d95d9301dea8b6ebfe251c /XMonad.hs
parent916c58411f780c99b5b3b2d9e773d673f55f7579 (diff)
downloadmetatile-d5ef958f82520a392c77ace3df5ea398c133b81c.tar
metatile-d5ef958f82520a392c77ace3df5ea398c133b81c.zip
Update Layout documentation
darcs-hash:20070620150858-a5988-761f067579d6df331fd868db2bc010590a0a7939
Diffstat (limited to 'XMonad.hs')
-rw-r--r--XMonad.hs11
1 files changed, 9 insertions, 2 deletions
diff --git a/XMonad.hs b/XMonad.hs
index b6e9f91..6242b40 100644
--- a/XMonad.hs
+++ b/XMonad.hs
@@ -116,8 +116,15 @@ atom_WM_STATE = getAtom "WM_STATE"
-- | Layout handling
-- The different layout modes
--- 'doLayout', a pure function to layout a Window set 'modifyLayout',
--- 'modifyLayout' can be considered a branch of an exception handler.
+-- 'doLayout': given a Rectangle and a Stack, layout the stack elements
+-- inside the given Rectangle. If an element is not given a Rectangle
+-- by 'doLayout', then it is not shown on screen. Windows are restacked
+-- according to the order they are returned by 'doLayout'.
+--
+-- 'modifyLayout' performs message handling for that layout. If
+-- 'modifyLayout' returns Nothing, then the layout did not respond to
+-- that message and the screen is not refreshed. Otherwise, 'modifyLayout'
+-- returns an updated 'Layout' and the screen is refreshed.
--
data Layout a = Layout { doLayout :: Rectangle -> Stack a -> X [(a, Rectangle)]
, modifyLayout :: SomeMessage -> X (Maybe (Layout a)) }