aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Layout/NoBorders.hs
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad/Layout/NoBorders.hs')
-rw-r--r--XMonad/Layout/NoBorders.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/XMonad/Layout/NoBorders.hs b/XMonad/Layout/NoBorders.hs
index 6b022ed..7bcd609 100644
--- a/XMonad/Layout/NoBorders.hs
+++ b/XMonad/Layout/NoBorders.hs
@@ -72,7 +72,7 @@ instance LayoutModifier SmartBorder Window where
unhook (SmartBorder s) = asks (borderWidth . config) >>= setBorders s
redoLayout (SmartBorder s) _ _ wrs = do
- ss <- gets (W.screens . windowset)
+ ss <- gets (filter (nonzerorect . screenRect . W.screenDetail) . W.screens . windowset)
if singleton ws && singleton ss
then do
@@ -85,6 +85,8 @@ instance LayoutModifier SmartBorder Window where
where
ws = map fst wrs
singleton = null . drop 1
+ nonzerorect (Rectangle _ _ 0 0) = False
+ nonzerorect _ = True
--
-- | You can cleverly set no borders on a range of layouts, using a