diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2009-03-14 18:00:58 +0100 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2009-03-14 18:00:58 +0100 |
commit | aa7e7be7a4007b21d4ef8b5a2c1b2e200ee3712a (patch) | |
tree | d34e33ed35d0d7530ba3b3223d7837689d3fadbe | |
parent | 968421004fe65227f0fd608494120c32eccd8cff (diff) | |
download | XMonadContrib-aa7e7be7a4007b21d4ef8b5a2c1b2e200ee3712a.tar.gz XMonadContrib-aa7e7be7a4007b21d4ef8b5a2c1b2e200ee3712a.tar.xz XMonadContrib-aa7e7be7a4007b21d4ef8b5a2c1b2e200ee3712a.zip |
better Layout.NoBorders.smartBorders behavior on xinerama
Ignore-this: 36737ce2fa2087c4a16ddf226d3b0f0a
Now smartBorders shows borders when you have multiple screens with one window
each. In the case where only one window is visible, no borders are drawn.
darcs-hash:20090314170058-1499c-d684d8e2a27f0b4df4f7f4acb64ccbd42687ad71.gz
-rw-r--r-- | XMonad/Layout/NoBorders.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/XMonad/Layout/NoBorders.hs b/XMonad/Layout/NoBorders.hs index 99a877f..ec6d6e7 100644 --- a/XMonad/Layout/NoBorders.hs +++ b/XMonad/Layout/NoBorders.hs @@ -28,6 +28,7 @@ module XMonad.Layout.NoBorders ( import XMonad import XMonad.Layout.LayoutModifier import qualified XMonad.StackSet as W +import Data.Maybe(isJust) import Data.List ((\\)) import qualified Data.Map as M @@ -78,7 +79,9 @@ instance LayoutModifier SmartBorder Window where redoLayout (SmartBorder s) _ mst wrs = do wset <- gets windowset let managedwindows = W.integrate' mst - screens = filter (nonzerorect . screenRect . W.screenDetail) . W.screens $ wset + screens = [ scr | scr <- W.screens wset, + isJust . W.stack $ W.workspace scr, + nonzerorect . screenRect $ W.screenDetail scr] ws = tiled ++ floating tiled = case filter (`elem` managedwindows) $ map fst wrs of [w] | singleton screens -> [w] |