Skip to content

Commit

Permalink
Apply Guichan's changes from 98d94808f26240a1e7af77513a146cc9c2a870fd…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarod42 committed Aug 27, 2024
1 parent 69e01cf commit dc1a1a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion TODO
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* Continue rebasing from 98d94808f26240a1e7af77513a146cc9c2a870fd
* Continue rebasing from 24a11fbf50826a76862ff5667d371981628a0cbc
* Add a focus listener interface.
* Make focus apply synchronously.
* Graphics and input objects for DirectX.
Expand Down
11 changes: 8 additions & 3 deletions src/widgets/tabbedarea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,7 @@ namespace gcn

void TabbedArea::mousePressed(MouseEvent& mouseEvent)
{
if (mouseEvent.isConsumed()
&& mouseEvent.getSource()->isFocusable())
if (mouseEvent.isConsumed())
{
return;
}
Expand All @@ -445,7 +444,13 @@ namespace gcn
}
}

requestFocus();
// Request focus only if the source of the event is not focusable.
// If the source of the event is focused
// we don't want to steal the focus.
if (!mouseEvent.getSource()->isFocusable())
{
requestFocus();
}
}

void TabbedArea::death(const Event& event)
Expand Down

0 comments on commit dc1a1a5

Please sign in to comment.