From 5ac45778d561a39fa43ed537b469bc702846e6ae Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Tue, 13 Apr 2010 12:55:10 +0100 Subject: [PATCH] Relax the checking of navigability slightly, to handle the case where handle_size=0. Closes LP #562039 --- terminatorlib/util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/terminatorlib/util.py b/terminatorlib/util.py index 5bba43d6..8c7f8a9e 100755 --- a/terminatorlib/util.py +++ b/terminatorlib/util.py @@ -203,13 +203,13 @@ def get_nav_possible(edge, allocation, direction): """Check if the supplied allocation is in the right direction of the supplied edge""" if direction == 'left': - return((allocation.x + allocation.width) < edge) + return((allocation.x + allocation.width) <= edge) elif direction == 'right': - return(allocation.x > edge) + return(allocation.x >= edge) elif direction == 'up': - return((allocation.y + allocation.height) < edge) + return((allocation.y + allocation.height) <= edge) elif direction == 'down': - return(allocation.y > edge) + return(allocation.y >= edge) else: raise ValueError('Unknown direction: %s' % direction)