diff options
author | Andrea Rossato <andrea.rossato@unibz.it> | 2008-02-23 09:09:58 +0100 |
---|---|---|
committer | Andrea Rossato <andrea.rossato@unibz.it> | 2008-02-23 09:09:58 +0100 |
commit | c3a3497bbb10fc8f6da2bd9e1f5a6df4611e76fe (patch) | |
tree | 936ae666596b13a7630672e4bf7859253f4e8335 | |
parent | 729c6e4456f9184b575edaa97cbb3616e3388a90 (diff) | |
download | XMonadContrib-c3a3497bbb10fc8f6da2bd9e1f5a6df4611e76fe.tar.gz XMonadContrib-c3a3497bbb10fc8f6da2bd9e1f5a6df4611e76fe.tar.xz XMonadContrib-c3a3497bbb10fc8f6da2bd9e1f5a6df4611e76fe.zip |
LayoutCombinators: NewSelect reimplemented with runLayout
darcs-hash:20080223080958-32816-0cd66f526f8984fe2d5265e7252903370e0fbdd4.gz
-rw-r--r-- | XMonad/Layout/LayoutCombinators.hs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/XMonad/Layout/LayoutCombinators.hs b/XMonad/Layout/LayoutCombinators.hs index 67c09b0..4c18570 100644 --- a/XMonad/Layout/LayoutCombinators.hs +++ b/XMonad/Layout/LayoutCombinators.hs @@ -46,6 +46,7 @@ module XMonad.Layout.LayoutCombinators import Data.Maybe ( isJust, isNothing ) import XMonad hiding ((|||)) +import XMonad.StackSet (Workspace (..)) import XMonad.Layout.Combo import XMonad.Layout.DragPane @@ -159,14 +160,11 @@ data JumpToLayout = JumpToLayout String deriving ( Read, Show, Typeable ) instance Message JumpToLayout instance (LayoutClass l1 a, LayoutClass l2 a) => LayoutClass (NewSelect l1 l2) a where - doLayout (NewSelect True l1 l2) r s = do (wrs, ml1') <- doLayout l1 r s - return (wrs, (\l1' -> NewSelect True l1' l2) `fmap` ml1') - doLayout (NewSelect False l1 l2) r s = do (wrs, ml2') <- doLayout l2 r s - return (wrs, (\l2' -> NewSelect False l1 l2') `fmap` ml2') - emptyLayout (NewSelect True l1 l2) r = do (wrs, ml1') <- emptyLayout l1 r - return (wrs, (\l1' -> NewSelect True l1' l2) `fmap` ml1') - emptyLayout (NewSelect False l1 l2) r = do (wrs, ml2') <- emptyLayout l2 r - return (wrs, (\l2' -> NewSelect False l1 l2') `fmap` ml2') + runLayout (Workspace i (NewSelect True l1 l2) ms) r = do (wrs, ml1') <- runLayout (Workspace i l1 ms) r + return (wrs, (\l1' -> NewSelect True l1' l2) `fmap` ml1') + + runLayout (Workspace i (NewSelect False l1 l2) ms) r = do (wrs, ml2') <- runLayout (Workspace i l2 ms) r + return (wrs, (\l2' -> NewSelect False l1 l2') `fmap` ml2') description (NewSelect True l1 _) = description l1 description (NewSelect False _ l2) = description l2 handleMessage l@(NewSelect False _ _) m |