diff options
author | David Roundy <droundy@darcs.net> | 2007-06-12 17:05:55 +0200 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2007-06-12 17:05:55 +0200 |
commit | 8d0355c4281b59e532d6fd7397161a61a58a579b (patch) | |
tree | 07c89936466799b92849fa9f64bbcd197cdb021b /XMonad.hs | |
parent | ca2ac1364ec6d2ec621be66647c925ee294a6013 (diff) | |
download | metatile-8d0355c4281b59e532d6fd7397161a61a58a579b.tar metatile-8d0355c4281b59e532d6fd7397161a61a58a579b.zip |
make focus, up and down complete functions.
This is a rerun of my change to make (Stack a) never be empty. Gives
us more type-safety.
darcs-hash:20070612150555-72aca-5f6e43aa33979c71679a73b44d93f9e2b8f9d2a8
Diffstat (limited to 'XMonad.hs')
-rw-r--r-- | XMonad.hs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -16,7 +16,7 @@ module XMonad ( X, WindowSet, WorkspaceId(..), ScreenId(..), XState(..), XConf(..), Layout(..), - Typeable, Message, SomeMessage(..), fromMessage, + Typeable, Message, SomeMessage(..), fromMessage, runLayout, runX, io, catchIO, withDisplay, withWindowSet, isRoot, spawn, restart, trace, whenJust, whenX, atom_WM_STATE, atom_WM_PROTOCOLS, atom_WM_DELETE_WINDOW ) where @@ -111,6 +111,9 @@ atom_WM_STATE = getAtom "WM_STATE" data Layout = Layout { doLayout :: Rectangle -> Stack Window -> X [(Window, Rectangle)] , modifyLayout :: SomeMessage -> X (Maybe Layout) } +runLayout :: Layout -> Rectangle -> StackOrNot Window -> X [(Window, Rectangle)] +runLayout l r = maybe (return []) (doLayout l r) + -- Based on ideas in /An Extensible Dynamically-Typed Hierarchy of Exceptions/, -- Simon Marlow, 2006. Use extensible messages to the modifyLayout handler. -- |