summaryrefslogtreecommitdiffstats
path: root/XMonad.hs
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-09-20 17:52:37 +0200
committerDavid Roundy <droundy@darcs.net>2007-09-20 17:52:37 +0200
commit7fb3159ce65a49b2ec7666e663a90d1a5fc475e1 (patch)
treeb72dfa8760e5cec9ff86d96f5e15afdb2ad547fe /XMonad.hs
parent6ba134c9e54d42c189d60a924c27921739b7c197 (diff)
downloadmetatile-7fb3159ce65a49b2ec7666e663a90d1a5fc475e1.tar
metatile-7fb3159ce65a49b2ec7666e663a90d1a5fc475e1.zip
eliminate ugly OldLayout.
darcs-hash:20070920155237-72aca-af9e13a03fd7fb1e4c5b452c5d42817bd5060b0f
Diffstat (limited to 'XMonad.hs')
-rw-r--r--XMonad.hs10
1 files changed, 1 insertions, 9 deletions
diff --git a/XMonad.hs b/XMonad.hs
index 97f4ee1..f46af7a 100644
--- a/XMonad.hs
+++ b/XMonad.hs
@@ -15,7 +15,7 @@
-----------------------------------------------------------------------------
module XMonad (
- X, WindowSet, WorkspaceId, ScreenId(..), ScreenDetail(..), XState(..), XConf(..), Layout(..), OldLayout(..), SomeLayout(..),
+ X, WindowSet, WorkspaceId, ScreenId(..), ScreenDetail(..), XState(..), XConf(..), Layout(..), SomeLayout(..),
Typeable, Message, SomeMessage(..), fromMessage, runLayout,
runX, catchX, io, catchIO, withDisplay, withWindowSet, isRoot, getAtom, spawn, restart, trace, whenJust, whenX,
atom_WM_STATE, atom_WM_PROTOCOLS, atom_WM_DELETE_WINDOW
@@ -131,20 +131,12 @@ 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 OldLayout a =
- OldLayout { doLayout' :: Rectangle -> Stack a -> X ([(a, Rectangle)], Maybe (OldLayout a))
- , modifyLayout' :: SomeMessage -> X (Maybe (OldLayout a)) }
-
data SomeLayout a = forall l. Layout l a => SomeLayout (l a)
class Layout layout a where
doLayout :: layout a -> Rectangle -> Stack a -> X ([(a, Rectangle)], Maybe (layout a))
modifyLayout :: layout a -> SomeMessage -> X (Maybe (layout a))
-instance Layout OldLayout a where
- doLayout = doLayout'
- modifyLayout = modifyLayout'
-
instance Layout SomeLayout a where
doLayout (SomeLayout l) r s = do (ars, ml') <- doLayout l r s
return (ars, SomeLayout `fmap` ml' )