summaryrefslogtreecommitdiffstats
path: root/Operations.hs
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-06-10 17:38:36 +0200
committerDavid Roundy <droundy@darcs.net>2007-06-10 17:38:36 +0200
commit242b06df642f135f1b4e849d49a18099cf71d0e9 (patch)
treed95eecbfd982afa8a6d559fefeaee13bfd7f201d /Operations.hs
parent2efe3291b8b3db7b2c3c729297760ebd7677a8f4 (diff)
downloadmetatile-242b06df642f135f1b4e849d49a18099cf71d0e9.tar
metatile-242b06df642f135f1b4e849d49a18099cf71d0e9.zip
a few modifications to event-sending to make Tabbed layout work.
darcs-hash:20070610153836-72aca-75025ca798e1b8c2c5d9f95257aef2bca0803749
Diffstat (limited to 'Operations.hs')
-rw-r--r--Operations.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Operations.hs b/Operations.hs
index 7405ce7..b4c33cf 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -123,7 +123,7 @@ kill = withDisplay $ \d -> withFocused $ \w -> do
-- ---------------------------------------------------------------------
-- Managing windows
-data ModifyWindows = ModifyWindows deriving Typeable
+data ModifyWindows = ModifyWindows deriving ( Typeable, Eq )
instance Message ModifyWindows
-- | windows. Modify the current window list with a pure function, and refresh
@@ -345,6 +345,8 @@ sendMessage a = do n <- (W.tag . W.workspace . W.current) `fmap` gets windowset
whenJust ml' $ \l' -> do modify $ \s -> s { layouts = M.insert n (l',ls) (layouts s) }
refresh
+instance Message Event
+
--
-- Builtin layout algorithms:
--
@@ -436,6 +438,7 @@ splitVerticallyBy f = (mirrorRect *** mirrorRect) . splitHorizontallyBy f . mirr
-- function and refresh.
layout :: ((Layout, [Layout]) -> (Layout, [Layout])) -> X ()
layout f = do
+ sendMessage ModifyWindows
modify $ \s ->
let n = W.tag . W.workspace . W.current . windowset $ s
(Just fl) = M.lookup n $ layouts s