mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-07 07:21:53 -07:00
make smartBorders ignore screens with no dimensions.
This commit is contained in:
@@ -72,7 +72,7 @@ instance LayoutModifier SmartBorder Window where
|
|||||||
unhook (SmartBorder s) = asks (borderWidth . config) >>= setBorders s
|
unhook (SmartBorder s) = asks (borderWidth . config) >>= setBorders s
|
||||||
|
|
||||||
redoLayout (SmartBorder s) _ _ wrs = do
|
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
|
if singleton ws && singleton ss
|
||||||
then do
|
then do
|
||||||
@@ -85,6 +85,8 @@ instance LayoutModifier SmartBorder Window where
|
|||||||
where
|
where
|
||||||
ws = map fst wrs
|
ws = map fst wrs
|
||||||
singleton = null . drop 1
|
singleton = null . drop 1
|
||||||
|
nonzerorect (Rectangle _ _ 0 0) = False
|
||||||
|
nonzerorect _ = True
|
||||||
|
|
||||||
--
|
--
|
||||||
-- | You can cleverly set no borders on a range of layouts, using a
|
-- | You can cleverly set no borders on a range of layouts, using a
|
||||||
|
Reference in New Issue
Block a user