From 021a11795a9559370e43d00e88603d30ba1a19fa Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Tue, 12 Jun 2007 07:58:59 +0200 Subject: Use a more descriptive name for the layout reversal message darcs-hash:20070612055859-e3110-f6bc973ba180f1ec9ded1a03cde0fc0eb16b7bd7 --- Operations.hs | 10 +++++----- 1 file 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 -- cgit v1.2.3