aboutsummaryrefslogtreecommitdiffstats
path: root/DwmPromote.hs
diff options
context:
space:
mode:
authorMiikka Koskinen <arcatan@kapsi.fi>2007-05-13 20:42:54 +0200
committerMiikka Koskinen <arcatan@kapsi.fi>2007-05-13 20:42:54 +0200
commit199b34cb3638ba0bffe76891fa2da107b07bb836 (patch)
tree2c4a9169936c9c16ffe2b768ea1051b217fe92e1 /DwmPromote.hs
parent0a94f42558fbcc6e7bbc6bdd8b12b3a22cecc9d2 (diff)
downloadXMonadContrib-199b34cb3638ba0bffe76891fa2da107b07bb836.tar.gz
XMonadContrib-199b34cb3638ba0bffe76891fa2da107b07bb836.tar.xz
XMonadContrib-199b34cb3638ba0bffe76891fa2da107b07bb836.zip
make DwmPromote compile
darcs-hash:20070513184254-0ff8e-5f3f5310fa8469fddfb7923fed31cecbc4c2d371.gz
Diffstat (limited to 'DwmPromote.hs')
-rw-r--r--DwmPromote.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/DwmPromote.hs b/DwmPromote.hs
index e2f64a0..b3434f6 100644
--- a/DwmPromote.hs
+++ b/DwmPromote.hs
@@ -33,13 +33,13 @@ import qualified Data.Map as M
dwmpromote :: X ()
dwmpromote = windows promote
-promote :: (Integral i, Ord a) => StackSet i j a -> StackSet i j a
+promote :: (Integral i, Integral j, Ord a) => StackSet i j a -> StackSet i j a
promote w = maybe w id $ do
a <- peek w -- fail if null
stack <- index (current w) w
let newstack = swap a (next stack a) stack
- return $ w { stacks = M.adjust (\(f,_) -> (f, newstack)) (current w) (stacks w),
- focus = M.insert (current w) (head newstack) (focus w) }
+ return . raiseFocus (head newstack) $
+ w { stacks = M.adjust (\(f,_) -> (f, newstack)) (current w) (stacks w) }
where
next s a | head s /= a = head s -- focused is not master
| length s > 1 = s !! 1