diff options
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] |