Updates to work with recent API changes

This commit is contained in:
Spencer Janssen
2007-06-11 18:34:39 +00:00
parent e8e8457e4c
commit fca67d33d7
8 changed files with 22 additions and 15 deletions

View File

@@ -13,9 +13,10 @@ import qualified StackSet as W
import Control.Monad.State (gets)
twoPane :: Rational -> Rational -> Layout
twoPane delta split = Layout { doLayout = arrange, modifyLayout = message }
twoPane delta split = Layout { doLayout = \r -> arrange r . W.integrate, modifyLayout = message }
where
arrange rect ws@(w:x:_) = do
-- TODO this is buggy, it might peek another workspace
(Just f) <- gets (W.peek . windowset) -- safe because of pattern match above
let y = if f == w then x else f
(left, right) = splitHorizontallyBy split rect