diff options
| author | Marco Trevisan (TreviƱo) <mail@3v1n0.net> | 2013-11-21 19:38:45 +0000 | 
|---|---|---|
| committer | Tarmac <> | 2013-11-21 19:38:45 +0000 | 
| commit | 529f0660e6578490701918103b86ff841070a153 (patch) | |
| tree | c2315564e9ff904778722c5a80bdac7397aa1e1e /hud | |
| parent | 8e0868523fee70ac29bf7a9a3f25a7c75bf5317f (diff) | |
| parent | df784e49fb207de548f77bb345e53705bb3e1370 (diff) | |
{Dash,Hud}Controller: unset the keyfocus area only if one of their children has the focus
Otherwise we could steal the focus to another view (such as the Alt+Tab switcher). Fixes: https://bugs.launchpad.net/bugs/1252760. Approved by PS Jenkins bot, Brandon Schaefer. (bzr r3602)
Diffstat (limited to 'hud')
| -rw-r--r-- | hud/HudController.cpp | 7 | 
1 files changed, 6 insertions, 1 deletions
| diff --git a/hud/HudController.cpp b/hud/HudController.cpp index 13c499c6a..6178bb618 100644 --- a/hud/HudController.cpp +++ b/hud/HudController.cpp @@ -408,8 +408,13 @@ void Controller::HideHud()  window_->EnableInputWindow(false, "Hud", true, false);  visible_ = false; + auto& wc = nux::GetWindowCompositor(); + auto *key_focus_area = wc.GetKeyFocusArea(); + if (key_focus_area && key_focus_area->IsChildOf(view_)) + wc.SetKeyFocusArea(nullptr, nux::KEY_NAV_NONE); +  WindowManager::Default().RestoreInputFocus(); - nux::GetWindowCompositor().SetKeyFocusArea(NULL, nux::KEY_NAV_NONE); +  StartShowHideTimeline();  hud_service_.CloseQuery(); | 
