mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
Fix -Wincomplete-record-updates warnings
(undefined has `HasCallStack =>` so this will give a useful error message if anyone ever makes the code fail)
This commit is contained in:
parent
b83f49d90b
commit
5f3a6210a2
@ -425,13 +425,14 @@ resizeSplit :: Direction2D -> (Rational,Rational) -> Zipper Split -> Maybe (Zipp
|
||||
resizeSplit _ _ z@(_, []) = Just z
|
||||
resizeSplit dir (xsc,ysc) z = case goToBorder dir z of
|
||||
Nothing -> Just z
|
||||
Just (t, crumb) -> Just $ case dir of
|
||||
Just (t@Node{}, crumb) -> Just $ case dir of
|
||||
R -> (t{value=sp{ratio=scaleRatio (ratio sp) xsc}}, crumb)
|
||||
D -> (t{value=sp{ratio=scaleRatio (ratio sp) ysc}}, crumb)
|
||||
L -> (t{value=sp{ratio=1-scaleRatio (1-ratio sp) xsc}}, crumb)
|
||||
U -> (t{value=sp{ratio=1-scaleRatio (1-ratio sp) ysc}}, crumb)
|
||||
where sp = value t
|
||||
scaleRatio r fac = min 0.9 $ max 0.1 $ r*fac
|
||||
Just (Leaf{}, _) -> undefined
|
||||
|
||||
-- starting from a leaf, go to node representing a border of the according window
|
||||
goToBorder :: Direction2D -> Zipper Split -> Maybe (Zipper Split)
|
||||
|
Loading…
x
Reference in New Issue
Block a user