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

This commit is contained in:
Chris Jones 2010-05-05 09:44:55 +01:00
parent 70ab3b0f71
commit 785ed8b591
1 changed files with 4 additions and 3 deletions

View File

@ -623,9 +623,10 @@ class Window(Container, gtk.Window):
if len(winners) > 1: if len(winners) > 1:
# Break an n-way tie using the cursor position # Break an n-way tie using the cursor position
cursor_x, cursor_y = terminal.get_cursor_position() term_alloc = terminal.allocation
cursor_x = cursor_x + allocation.x cursor_x = term_alloc.x + term_alloc.width / 2
cursor_y = cursor_y + allocation.y cursor_y = term_alloc.y + term_alloc.height / 2
for term in winners: for term in winners:
rect = layout[term] rect = layout[term]
if util.get_nav_tiebreak(direction, cursor_x, cursor_y, if util.get_nav_tiebreak(direction, cursor_x, cursor_y,