summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordaniel <daniel@wagner-home.com>2007-03-28 12:34:35 +0200
committerdaniel <daniel@wagner-home.com>2007-03-28 12:34:35 +0200
commitef6ff953e8ab5be8d542b33d26963141662fa0ea (patch)
treea23a2b7826156fe9efd648c9d06c81f60f5d3e4b
parenta9e0475af8c1760be81a8bb301b276994ff85a5b (diff)
downloadmetatile-ef6ff953e8ab5be8d542b33d26963141662fa0ea.tar
metatile-ef6ff953e8ab5be8d542b33d26963141662fa0ea.zip
allow mouse to change current workspace
darcs-hash:20070328103435-c98ca-4d9fe6e66589e0bc9cbd79eabe41a559084ce37f
-rw-r--r--StackSet.hs4
-rw-r--r--TODO3
2 files changed, 2 insertions, 5 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
diff --git a/TODO b/TODO
index 37579f5..1001ad4 100644
--- a/TODO
+++ b/TODO
@@ -25,8 +25,5 @@
- change focus in the StackSet structure on EnterNotify
- let mod+enter demote a master window
- borders (low priority, maybe wait until 0.2)
- - let focus-follows-mouse also change the active workspace (not just the
- active window); note that this currently also makes click-to-focus appear
- slightly buggy, since sometimes, the wrong window is exempted from setButtonGrab
* Tile vertically/ resize height.