summaryrefslogtreecommitdiffstats
path: root/Operations.hs
diff options
context:
space:
mode:
authorStefan O'Rear <stefanor@cox.net>2007-06-12 07:58:59 +0200
committerStefan O'Rear <stefanor@cox.net>2007-06-12 07:58:59 +0200
commit021a11795a9559370e43d00e88603d30ba1a19fa (patch)
treeecc557a7dbdc1d7e4e4ac79020239aef9db7183f /Operations.hs
parent724e231376c802883c2fdcfba36a2cc709837409 (diff)
downloadmetatile-021a11795a9559370e43d00e88603d30ba1a19fa.tar
metatile-021a11795a9559370e43d00e88603d30ba1a19fa.zip
Use a more descriptive name for the layout reversal message
darcs-hash:20070612055859-e3110-f6bc973ba180f1ec9ded1a03cde0fc0eb16b7bd7
Diffstat (limited to 'Operations.hs')
-rw-r--r--Operations.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Operations.hs b/Operations.hs
index 4dd5b08..b0819f6 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -123,8 +123,8 @@ kill = withDisplay $ \d -> withFocused $ \w -> do
-- ---------------------------------------------------------------------
-- Managing windows
-data ModifyWindows = ModifyWindows deriving ( Typeable, Eq )
-instance Message ModifyWindows
+data UnDoLayout = UnDoLayout deriving ( Typeable, Eq )
+instance Message UnDoLayout
-- | windows. Modify the current window list with a pure function, and refresh
windows :: (WindowSet -> WindowSet) -> X ()
@@ -132,7 +132,7 @@ windows f = do
-- Notify visible layouts to remove decorations etc
-- We cannot use sendMessage because this must not call refresh ever,
-- and must be called on all visible workspaces.
- broadcastMessage ModifyWindows
+ broadcastMessage UnDoLayout
XState { windowset = old, layouts = fls, xineScreens = xinesc, statusGaps = gaps } <- get
let oldvisible = concatMap (W.integrate . W.stack . W.workspace) $ W.current old : W.visible old
ws = f old
@@ -342,7 +342,7 @@ setFocusX w = withWindowSet $ \ws -> do
-- idempotent.
switchLayout :: X ()
switchLayout = do
- broadcastMessage ModifyWindows -- calling refresh now would defeat the point of deconstruction
+ broadcastMessage UnDoLayout -- calling refresh now would defeat the point of deconstruction
n <- gets (W.tag . W.workspace . W.current . windowset)
modify $ \s -> s { layouts = M.adjust switch n (layouts s) }
refresh
@@ -359,7 +359,7 @@ sendMessage a = do n <- (W.tag . W.workspace . W.current) `fmap` gets windowset
refresh
-- | Send a message to all visible layouts, without necessarily refreshing.
--- This is how we implement the hooks, such as ModifyWindows.
+-- This is how we implement the hooks, such as UnDoLayout.
broadcastMessage :: Message a => a -> X ()
broadcastMessage a = do
ol <- gets layouts