aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--XMonad/Layout/ShowWName.hs11
1 files changed, 8 insertions, 3 deletions
diff --git a/XMonad/Layout/ShowWName.hs b/XMonad/Layout/ShowWName.hs
index 2c0b6be..20d39d6 100644
--- a/XMonad/Layout/ShowWName.hs
+++ b/XMonad/Layout/ShowWName.hs
@@ -68,9 +68,9 @@ defaultSWNConfig =
}
instance LayoutModifier ShowWName a where
- redoLayout (SWN True c (Just (_,w))) r _ wrs = deleteWindow w >> flashName c r wrs
- redoLayout (SWN True c Nothing ) r _ wrs = flashName c r wrs
- redoLayout (SWN False _ _ ) _ _ wrs = return (wrs, Nothing)
+ redoLayout sn r _ wrs = doShow sn r wrs
+
+ emptyLayoutMod sn r wrs = doShow sn r wrs
handleMess (SWN _ c (Just (i,w))) m
| Just e <- fromMessage m = handleTimer i e (deleteWindow w >> return Nothing)
@@ -81,6 +81,11 @@ instance LayoutModifier ShowWName a where
| Just Hide <- fromMessage m = return . Just $ SWN True c s
| otherwise = return Nothing
+doShow :: ShowWName a -> Rectangle -> [(a,Rectangle)] -> X ([(a, Rectangle)], Maybe (ShowWName a))
+doShow (SWN True c (Just (_,w))) r wrs = deleteWindow w >> flashName c r wrs
+doShow (SWN True c Nothing ) r wrs = flashName c r wrs
+doShow (SWN False _ _ ) _ wrs = return (wrs, Nothing)
+
flashName :: SWNConfig -> Rectangle -> [(a, Rectangle)] -> X ([(a, Rectangle)], Maybe (ShowWName a))
flashName c (Rectangle _ _ wh ht) wrs = do
d <- asks display