Promote now swaps focused window with master window

This means other windows are unaffected.
The change from the previous cycling behaviour was felt necessary, since
cycling isn't a terribly useful operation.

Some properties that hold:
    focus is unchanged by promotion
    promote is idempotent (promoting twice does nothing)
    the focused and master window will swap their positions in the stack
This commit is contained in:
Don Stewart
2007-04-18 22:42:36 +00:00
parent d7917066ba
commit f3f83af393
3 changed files with 37 additions and 9 deletions

View File

@@ -91,9 +91,6 @@ flipRect (Rectangle rx ry rw rh) = (Rectangle ry rx rh rw)
-- tiling mode, the currently focused window becomes a master. When
-- switching back , the focused window is uppermost.
--
-- Note a current `feature' is that 'promote' cycles clockwise in Tall
-- mode, and counter clockwise in wide mode. This is a feature.
--
switchLayout :: X ()
switchLayout = layout $ \fl -> fl { layoutType = rotateLayout (layoutType fl) }
@@ -224,7 +221,7 @@ setBorder w p = withDisplay $ \d -> io $ setWindowBorder d w p
raise :: Ordering -> X ()
raise = windows . W.rotate
-- | promote. Cycle the current tiling order clockwise.
-- | promote. Move the currently focused window into the master frame
promote :: X ()
promote = windows W.promote