window.c
changeset 371 bcbc6fb59c26
parent 370 687b13abdf0c
child 386 99da03ebe6ad
--- a/window.c	Sat Nov 13 10:53:42 2004 +0000
+++ b/window.c	Sat Nov 13 11:08:50 2004 +0000
@@ -806,10 +806,8 @@
 				int v_bottom = v->top + v->height;
 				int v_right = v->left + v->width;
 				if (ny + t->top >= v->top && ny + t->top < v_bottom) {
-					if (v->left < 13 && nx + t->left < v->left) {
-						ny = v_bottom;
-					} else if (v_right > _screen.width - 13 &&
-							nx + t->right > v_right) {
+					if ((v->left < 13 && nx + t->left < v->left) ||
+							(v_right > _screen.width - 13 && nx + t->right > v_right)) {
 						ny = v_bottom;
 					} else {
 						if (nx + t->left > v->left - 13 &&