From 785ed8b5916914e8dbf9d256459f8bf0ca5a4a68 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Wed, 5 May 2010 09:44:55 +0100 Subject: [PATCH] Apply modified patch from Juan Manuel Santos to improve the directional navigation by not relying on bogus assumptions about the behaviour of get_cusor_position --- terminatorlib/window.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/terminatorlib/window.py b/terminatorlib/window.py index 2a6cfb34..6418b2ef 100755 --- a/terminatorlib/window.py +++ b/terminatorlib/window.py @@ -623,9 +623,10 @@ class Window(Container, gtk.Window): if len(winners) > 1: # Break an n-way tie using the cursor position - cursor_x, cursor_y = terminal.get_cursor_position() - cursor_x = cursor_x + allocation.x - cursor_y = cursor_y + allocation.y + term_alloc = terminal.allocation + cursor_x = term_alloc.x + term_alloc.width / 2 + cursor_y = term_alloc.y + term_alloc.height / 2 + for term in winners: rect = layout[term] if util.get_nav_tiebreak(direction, cursor_x, cursor_y,