summaryrefslogtreecommitdiffstats
path: root/StackSet.hs
diff options
context:
space:
mode:
Diffstat (limited to 'StackSet.hs')
-rw-r--r--StackSet.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/StackSet.hs b/StackSet.hs
index 8f3493d..2e02468 100644
--- a/StackSet.hs
+++ b/StackSet.hs
@@ -163,11 +163,11 @@ delete k w = maybe w tweak (M.lookup k (cache w))
, focus = M.update (\k' -> if k == k' then elemAfter k (stacks w M.! i) else Just k') i (focus w) }
-- | /O(log n)/. If the given window is contained in a workspace, make it the
--- focused window of that workspace.
+-- focused window of that workspace, and make that workspace the current one.
raiseFocus :: Ord a => a -> StackSet a -> StackSet a
raiseFocus k w = case M.lookup k (cache w) of
Nothing -> w
- Just i -> w { focus = M.insert i k (focus w) }
+ Just i -> w { focus = M.insert i k (focus w), current = i }
-- | Move a window to the top of its workspace.
promote :: Ord a => a -> StackSet a -> StackSet a