]> git.sur5r.net Git - i3/i3/commit - src/move.c
Movement into a branch considers movement direction
authorTony Crisci <tony@dubstepdish.com>
Tue, 26 Nov 2013 10:46:10 +0000 (05:46 -0500)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 6 Jan 2014 21:26:23 +0000 (22:26 +0100)
commitaa11c03d4cd651c6d9e45903f3bc214854467424
tree4767136e716fa99777e01b391d8f109f15ae755c
parentde3901bb291b6c9ed2691bcc81febbfbeffa2957
Movement into a branch considers movement direction

Change the behavior of movement into a branch with respect to the
position the moving con will be placed within the branch when the
movement is complete.

The correct position is determined by the direction of movement or the
position of the focused-inactive container within the branch.

If the direction of movement is the same as the orientation of the
branch container, append or prepend the container to the branch in the
obvious way.  If the movement is to the right or downward, insert the
moving container in the first position (i.e., the leftmost or top
position resp.) If the movement is to the left or upward, insert the
moving container in the last position (i.e., the rightmost or bottom
position resp.)

If the direction of movement is different from the orientation of the
branch container, insert the container into the branch after the
focused-inactive container.

fixes #1060
src/move.c
testcases/t/213-move-branch-position.t [new file with mode: 0644]