From aa7e7be7a4007b21d4ef8b5a2c1b2e200ee3712a Mon Sep 17 00:00:00 2001 From: Adam Vogt Date: Sat, 14 Mar 2009 18:00:58 +0100 Subject: 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 --- XMonad/Layout/NoBorders.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'XMonad') 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] -- cgit v1.2.3