Skip to content

Commit

Permalink
Fixed endless focus loop. Fixes #52
Browse files Browse the repository at this point in the history
  • Loading branch information
fruxo committed Jan 8, 2016
1 parent 487dd0f commit 084a3f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tb/tb_widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,10 +612,10 @@ bool TBWidget::MoveFocus(bool forward)
TBWidget *current = origin;
while (current)
{
current = forward ? current->GetNextDeep() : current->GetPrevDeep();
current = forward ? current->GetNextDeep(root) : current->GetPrevDeep();
// Wrap around if we reach the end/beginning
if (!current || !root->IsAncestorOf(current))
current = forward ? root->GetFirstChild() : root->GetLastLeaf();
current = forward ? root : root->GetLastLeaf();
// Break if we reached the origin again (we're not finding anything else)
if (current == origin)
break;
Expand Down

0 comments on commit 084a3f3

Please sign in to comment.