summaryrefslogtreecommitdiffstats
path: root/XMonad.hs
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-06-23 22:14:47 +0200
committerDavid Roundy <droundy@darcs.net>2007-06-23 22:14:47 +0200
commitab16766e1da5b7ef2325b6b7f851e570c29cc682 (patch)
tree785c0a78f55cc85704fee619ef782fd5e73b3c0d /XMonad.hs
parentdb7f73d293a484251035ad9ea8e2fe3767f2e43f (diff)
downloadmetatile-ab16766e1da5b7ef2325b6b7f851e570c29cc682.tar
metatile-ab16766e1da5b7ef2325b6b7f851e570c29cc682.zip
support self-modifying layouts.
darcs-hash:20070623201447-72aca-7bfeb7e7ec36b37420a4c670dc23156c52d7e22d
Diffstat (limited to 'XMonad.hs')
-rw-r--r--XMonad.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/XMonad.hs b/XMonad.hs
index 7914782..bc54bfd 100644
--- a/XMonad.hs
+++ b/XMonad.hs
@@ -126,11 +126,11 @@ atom_WM_STATE = getAtom "WM_STATE"
-- 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)]
+data Layout a = Layout { doLayout :: Rectangle -> Stack a -> X ([(a, Rectangle)], Maybe (Layout a))
, modifyLayout :: SomeMessage -> X (Maybe (Layout a)) }
-runLayout :: Layout a -> Rectangle -> StackOrNot a -> X [(a, Rectangle)]
-runLayout l r = maybe (return []) (doLayout l r)
+runLayout :: Layout a -> Rectangle -> StackOrNot a -> X ([(a, Rectangle)], Maybe (Layout a))
+runLayout l r = maybe (return ([], Nothing)) (doLayout l r)
-- | Based on ideas in /An Extensible Dynamically-Typed Hierarchy of Exceptions/,
-- Simon Marlow, 2006. Use extensible messages to the modifyLayout handler.