aboutsummaryrefslogtreecommitdiffstats
path: root/NoBorders.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-10-02 23:30:53 +0200
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-10-02 23:30:53 +0200
commit897a7213b02a495459dc4d8268b792da2562a506 (patch)
tree2a3bdf08ed9a7b79b0d2fa742dde68b36b32df69 /NoBorders.hs
parente450479101907357da9a07f6512ccfb4a9d3adaf (diff)
downloadXMonadContrib-897a7213b02a495459dc4d8268b792da2562a506.tar.gz
XMonadContrib-897a7213b02a495459dc4d8268b792da2562a506.tar.xz
XMonadContrib-897a7213b02a495459dc4d8268b792da2562a506.zip
NoBorders: reduce flicker
darcs-hash:20071002213053-a5988-39f5f90d0e14a23fc5def20d19c0701117a99513.gz
Diffstat (limited to 'NoBorders.hs')
-rw-r--r--NoBorders.hs13
1 files changed, 9 insertions, 4 deletions
diff --git a/NoBorders.hs b/NoBorders.hs
index 96c2586..a8554d5 100644
--- a/NoBorders.hs
+++ b/NoBorders.hs
@@ -32,6 +32,7 @@ import XMonad
import XMonadContrib.LayoutModifier
import {-# SOURCE #-} Config (borderWidth)
import qualified StackSet as W
+import Data.List ((\\))
-- $usage
-- You can use this module with the following in your Config.hs file:
@@ -57,7 +58,7 @@ instance LayoutModifier WithBorder Window where
unhook (WithBorder _ s) = setBorders borderWidth s
redoLayout (WithBorder n s) _ stack wrs = do
- setBorders borderWidth s
+ setBorders borderWidth (ws \\ s)
setBorders n ws
return (wrs, Just $ WithBorder n ws)
where
@@ -81,11 +82,15 @@ instance LayoutModifier SmartBorder Window where
redoLayout (SmartBorder s) _ stack wrs = do
ss <- gets (W.screens . windowset)
- setBorders borderWidth s
if singleton ws && singleton ss
- then do setBorders 0 ws; return (wrs, Just $ SmartBorder ws)
- else return (wrs, Just $ SmartBorder [])
+ then do
+ setBorders borderWidth (s \\ ws)
+ setBorders 0 ws
+ return (wrs, Just $ SmartBorder ws)
+ else do
+ setBorders borderWidth s
+ return (wrs, Just $ SmartBorder [])
where
ws = map fst wrs
singleton = null . drop 1