diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2008-10-05 20:44:26 +0200 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2008-10-05 20:44:26 +0200 |
commit | 72778301857e5ba4e34cbb2bc822612beefb36f2 (patch) | |
tree | c4f525c334dbb6006ced7eb2827ff98d255844f6 /XMonad/Layout | |
parent | ac30d214a5eb686b5559dc7cf7cf7bd2973f8cde (diff) | |
download | XMonadContrib-72778301857e5ba4e34cbb2bc822612beefb36f2.tar.gz XMonadContrib-72778301857e5ba4e34cbb2bc822612beefb36f2.tar.xz XMonadContrib-72778301857e5ba4e34cbb2bc822612beefb36f2.zip |
SmartBorders even for empty layouts
Fixes: http://code.google.com/p/xmonad/issues/detail?id"3
darcs-hash:20081005184426-23c07-6e58de9bb4e735e8c5cc8a6e08c0c369632f7839.gz
Diffstat (limited to 'XMonad/Layout')
-rw-r--r-- | XMonad/Layout/NoBorders.hs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/XMonad/Layout/NoBorders.hs b/XMonad/Layout/NoBorders.hs index 90434ee..c1210b4 100644 --- a/XMonad/Layout/NoBorders.hs +++ b/XMonad/Layout/NoBorders.hs @@ -75,10 +75,15 @@ data SmartBorder a = SmartBorder [a] deriving (Read, Show) instance LayoutModifier SmartBorder Window where unhook (SmartBorder s) = asks (borderWidth . config) >>= setBorders s - redoLayout (SmartBorder s) _ st wrs = do + redoLayout sb _ st wrs = genericLayoutMod sb (W.integrate st) wrs + + emptyLayoutMod sb _ wrs = genericLayoutMod sb [] wrs + +genericLayoutMod :: (SmartBorder Window) -> [Window] -> [(Window, b)] -> + X ([(Window, b)], Maybe (SmartBorder Window)) +genericLayoutMod (SmartBorder s) managedwindows wrs = do wset <- gets windowset - let managedwindows = W.integrate st - screens = filter (nonzerorect . screenRect . W.screenDetail) . W.screens $ wset + let screens = filter (nonzerorect . screenRect . W.screenDetail) . W.screens $ wset ws = tiled ++ floating tiled = case filter (`elem` managedwindows) $ map fst wrs of [w] | singleton screens -> [w] |