diff options
author | Don Stewart <dons@cse.unsw.edu.au> | 2007-03-07 06:01:39 +0100 |
---|---|---|
committer | Don Stewart <dons@cse.unsw.edu.au> | 2007-03-07 06:01:39 +0100 |
commit | bdc9bd2f6960546f1f80e70d6efca9eb2c4dac14 (patch) | |
tree | d663d68bcd6376fb8a19459662021389382f5738 /W.hs | |
parent | b29a91dc7028d3593eb8b05441f8ef1d5bf7a6e0 (diff) | |
download | xmonad-bdc9bd2f6960546f1f80e70d6efca9eb2c4dac14.tar.gz xmonad-bdc9bd2f6960546f1f80e70d6efca9eb2c4dac14.tar.xz xmonad-bdc9bd2f6960546f1f80e70d6efca9eb2c4dac14.zip |
just use [Window]
darcs-hash:20070307050139-9c5c1-a67691477173216dfcfbaf9bf7fea814160586e2.gz
Diffstat (limited to 'W.hs')
-rw-r--r-- | W.hs | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -16,10 +16,9 @@ module W where -import Data.Sequence -import Control.Monad.State -import System.IO (hFlush, hPutStrLn, stderr) +import System.IO import Graphics.X11.Xlib +import Control.Monad.State -- -- | WState, the window manager state. @@ -29,9 +28,11 @@ data WState = WState { display :: Display , screenWidth :: !Int , screenHeight :: !Int - , windows :: Seq Window + , windows :: Windows } +type Windows = [Window] + -- | The W monad, a StateT transformer over IO encapuslating the window -- manager state -- @@ -85,7 +86,7 @@ getDisplay :: W Display getDisplay = W (gets display) -- | Return the current windows -getWindows :: W (Seq Window) +getWindows :: W Windows getWindows = W (gets windows) -- | Return the screen width @@ -97,9 +98,9 @@ getScreenHeight :: W Int getScreenHeight = W (gets screenHeight) -- | Set the current window list -setWindows :: Seq Window -> W () +setWindows ::Windows -> W () setWindows x = W (modify (\s -> s {windows = x})) -- | Modify the current window list -modifyWindows :: (Seq Window -> Seq Window) -> W () +modifyWindows :: (Windows -> Windows) -> W () modifyWindows f = W (modify (\s -> s {windows = f (windows s)})) |