foo-wm

(Archived) Experimental Zooming IPC-based WM
git clone http://milesalan.com/git/foo-wm
Log | Files | Refs | Mirror | README | LICENSE

commit a28090e28803d32af06d1d5e0a0a68e9af5e712a
parent 952d1df7d45398fa15d4df524a0695b9e0faa760
Author: = <miles.sandlar@gmail.com>
Date:   Thu,  2 Aug 2012 18:15:21 -0400

Bug fix for crashes dealing with horizontal/vert

Diffstat:
Msrc/tree.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/tree.c b/src/tree.c @@ -412,7 +412,7 @@ Node * getBrotherByDirection(Node * node, int direction) { dest = nodePosition - cols; if (dest >= 0) { n = node; - if (!node -> next && isPrime(parentChildren)) dest++; + if (!node -> next && cols != 1 && isPrime(parentChildren)) dest++; while (dest != nodePosition) { n = n -> previous; dest++; } @@ -430,7 +430,7 @@ Node * getBrotherByDirection(Node * node, int direction) { } else if (dest <= parentChildren + 1 && isPrime(parentChildren)) { n = node; // Prime odd case while (n -> next) { n = n -> next; } - return n; + if (n != node) return n; } break; }