From 606e8b876ab24bb643cf63c25caa15327b408111 Mon Sep 17 00:00:00 2001 From: Anders Engstrom Date: Tue, 24 Feb 2009 18:20:18 +0100 Subject: Combo fix ReleaseResources when no windows are available, new fix Ignore-this: b59603df8e4cfc1fb2cf9070cea615b3 darcs-hash:20090224172018-8978f-c60641c3fb09b8e7ca8e33c49ec8bcc5152b4102.gz --- XMonad/Layout/Combo.hs | 11 +++++------ 1 file 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 -- cgit v1.2.3