summaryrefslogtreecommitdiffstats
path: root/Operations.hs
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-04-11 09:34:56 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-04-11 09:34:56 +0200
commit7bc2ce98a04cf002d52c1ae04d383d7f08d9910b (patch)
tree7e31c8f2fdee2d831d3bce803457e7464e588536 /Operations.hs
parent43ee17b194d37d2efdaad9167cca368585eacdec (diff)
downloadmetatile-7bc2ce98a04cf002d52c1ae04d383d7f08d9910b.tar
metatile-7bc2ce98a04cf002d52c1ae04d383d7f08d9910b.zip
Change semantics of 'promote'.
Previously 'promote' would move the currently focused window into the master position in tiled mode. This was *almost* a cycle of the windows, but not quite (depending on where the focus was, it was in fact a cycle). Now we do the obvious generalisation, and just cycle the current window stack. Simpler to understand, simpler to reason about. darcs-hash:20070411073456-9c5c1-3ee88f9ac46e2301b4c803ec4fd66798e6fee91d
Diffstat (limited to 'Operations.hs')
-rw-r--r--Operations.hs10
1 files changed, 3 insertions, 7 deletions
diff --git a/Operations.hs b/Operations.hs
index b181414..6118593 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -34,7 +34,7 @@ refresh = do
mapM_ (\(w, rect) -> io $ moveWindowInside d w rect) $
case layoutType fl of
Full -> fmap (flip (,) sc) $ maybeToList $ W.peekStack n ws
- Tall -> tile (tileFraction fl) sc $ W.index n ws
+ Tall -> tile (tileFraction fl) sc $ W.index n ws
Wide -> vtile (tileFraction fl) sc $ W.index n ws
whenJust (W.peekStack n ws) (io . raiseWindow d)
whenJust (W.peek ws) setFocus
@@ -192,13 +192,9 @@ setBorder w p = withDisplay $ \d -> io $ setWindowBorder d w p
raise :: Ordering -> X ()
raise = windows . W.rotate
--- | promote. Make the focused window the master window in its
--- workspace
---
--- TODO: generic cycling clockwise and anticlockwise
---
+-- | promote. Cycle the current tiling order clockwise.
promote :: X ()
-promote = windows $ \w -> maybe w (\k -> W.promote k w) (W.peek w)
+promote = windows W.promote
-- | Kill the currently focused client
kill :: X ()