From cb0fe85e5bf43ea2076bb5328ae77dada32439e6 Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Wed, 11 Apr 2007 09:34:56 +0200 Subject: 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.gz --- Operations.hs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'Operations.hs') 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 () -- cgit v1.2.3