aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2008-03-08 23:42:44 +0100
committerDavid Roundy <droundy@darcs.net>2008-03-08 23:42:44 +0100
commit8d49aea49077fd1203100d44dc6100ff4f8ce9e0 (patch)
tree0a0d7d9b251bf7308ecc05a2e4a507471857d458
parent844bfb538b4e342a26a1fc12806ba135d66663ca (diff)
downloadXMonadContrib-8d49aea49077fd1203100d44dc6100ff4f8ce9e0.tar.gz
XMonadContrib-8d49aea49077fd1203100d44dc6100ff4f8ce9e0.tar.xz
XMonadContrib-8d49aea49077fd1203100d44dc6100ff4f8ce9e0.zip
make smartBorders ignore screens with no dimensions.
darcs-hash:20080308224244-72aca-a97a3505a284f30a2fa38051195397700338a205.gz
-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