summaryrefslogtreecommitdiff
path: root/hud
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2013-11-19 16:34:44 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2013-11-19 16:34:44 +0100
commit094ea4668e53157480ab0f4b80fd6ce80bad6f9e (patch)
tree7f7c0eced315e59624c9032e7f91d507435db0fd /hud
parent460805d99483f65d44b688e93f018aa4a7240b06 (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 LP: #1252760 (bzr r3347.7.1)
Diffstat (limited to 'hud')
-rw-r--r--hud/HudController.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/hud/HudController.cpp b/hud/HudController.cpp
index ddef8af4f..e8b6e5a69 100644
--- a/hud/HudController.cpp
+++ b/hud/HudController.cpp
@@ -409,8 +409,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();