summaryrefslogtreecommitdiffstats
path: root/XMonad.hs
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad.hs')
-rw-r--r--XMonad.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/XMonad.hs b/XMonad.hs
index df1dade..b296a38 100644
--- a/XMonad.hs
+++ b/XMonad.hs
@@ -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.
--