diff options
author | Anders Engstrom <ankaan@gmail.com> | 2009-02-24 18:20:18 +0100 |
---|---|---|
committer | Anders Engstrom <ankaan@gmail.com> | 2009-02-24 18:20:18 +0100 |
commit | 606e8b876ab24bb643cf63c25caa15327b408111 (patch) | |
tree | a21f340ee95be7df2e0a61f10282ac439b377aa1 | |
parent | 0d61ab7372d1f6a4e5d8107f6537e734fff8570c (diff) | |
download | XMonadContrib-606e8b876ab24bb643cf63c25caa15327b408111.tar.gz XMonadContrib-606e8b876ab24bb643cf63c25caa15327b408111.tar.xz XMonadContrib-606e8b876ab24bb643cf63c25caa15327b408111.zip |
Combo fix ReleaseResources when no windows are available, new fix
Ignore-this: b59603df8e4cfc1fb2cf9070cea615b3
darcs-hash:20090224172018-8978f-c60641c3fb09b8e7ca8e33c49ec8bcc5152b4102.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad/Layout/Combo.hs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/XMonad/Layout/Combo.hs b/XMonad/Layout/Combo.hs index ca493ee..04ef1db 100644 --- a/XMonad/Layout/Combo.hs +++ b/XMonad/Layout/Combo.hs @@ -25,7 +25,7 @@ module XMonad.Layout.Combo ( import Data.List ( delete, intersect, (\\) ) import Data.Maybe ( isJust ) import XMonad hiding (focus) -import XMonad.StackSet ( integrate, Workspace (..), Stack(..) ) +import XMonad.StackSet ( integrate', Workspace (..), Stack(..) ) import XMonad.Layout.WindowNavigation ( MoveWindowToWindow(..) ) import qualified XMonad.StackSet as W ( differentiate ) @@ -76,7 +76,7 @@ combineTwo = C2 [] [] instance (LayoutClass l (), LayoutClass l1 a, LayoutClass l2 a, Read a, Show a, Eq a, Typeable a) => LayoutClass (CombineTwo (l ()) l1 l2) a where - doLayout (C2 f w2 super l1 l2) rinput s = arrange (integrate s) + runLayout (Workspace _ (C2 f w2 super l1 l2) s) rinput = arrange (integrate' s) where arrange [] = do l1' <- maybe l1 id `fmap` handleMessage l1 (SomeMessage ReleaseResources) l2' <- maybe l2 id `fmap` handleMessage l2 (SomeMessage ReleaseResources) super' <- maybe super id `fmap` @@ -93,12 +93,11 @@ instance (LayoutClass l (), LayoutClass l1 a, LayoutClass l2 a, Read a, Show a, x -> case origws \\ x of [] -> init x _ -> x - superstack = if focus s `elem` w2' - then Stack { focus=(), up=[], down=[()] } - else Stack { focus=(), up=[], down=[()] } + superstack = Stack { focus=(), up=[], down=[()] } s1 = differentiate f' (origws \\ w2') s2 = differentiate f' w2' - f' = focus s:delete (focus s) f + f' = case s of (Just s') -> focus s':delete (focus s') f + Nothing -> f ([((),r1),((),r2)], msuper') <- runLayout (Workspace "" super (Just superstack)) rinput (wrs1, ml1') <- runLayout (Workspace "" l1 s1) r1 (wrs2, ml2') <- runLayout (Workspace "" l2 s2) r2 |