Skip to content

Commit

Permalink
Fixed|UI|Client: Clearing the input focus
Browse files Browse the repository at this point in the history
Input focus shouldn't be held by a widget has been moved offscreen.
  • Loading branch information
skyjake committed Jul 27, 2016
1 parent 5054ba4 commit 664221c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doomsday/apps/client/src/ui/home/homewidget.cpp
Expand Up @@ -238,6 +238,8 @@ DENG_GUI_PIMPL(HomeWidget)

void aboutToLoadGame(Game const &gameBeingLoaded)
{
self.root().setFocus(nullptr);

if (gameBeingLoaded.isNull())
{
moveOnscreen();
Expand Down Expand Up @@ -272,6 +274,8 @@ DENG_GUI_PIMPL(HomeWidget)

void moveOffscreen(TimeDelta span = DISMISS_SPAN)
{
self.root().setFocus(nullptr);

// Home is being moved offscreen, so the game can take over in full size.
ClientWindow::main().setGameMinimized(false);

Expand Down
Expand Up @@ -84,6 +84,8 @@ DENG_GUI_PIMPL(MultiplayerPanelButtonWidget)

void joinButtonPressed() const
{
self.root().setFocus(nullptr);

DENG2_FOR_PUBLIC_AUDIENCE2(AboutToJoin, i) i->aboutToJoinMultiplayerGame(serverInfo);

// Use a delayed callback so that the UI is not blocked while we switch games.
Expand Down

0 comments on commit 664221c

Please sign in to comment.