diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2013-11-19 16:34:44 +0100 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2013-11-19 16:34:44 +0100 |
| commit | 094ea4668e53157480ab0f4b80fd6ce80bad6f9e (patch) | |
| tree | 7f7c0eced315e59624c9032e7f91d507435db0fd /dash | |
| parent | 460805d99483f65d44b688e93f018aa4a7240b06 (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 'dash')
| -rw-r--r-- | dash/DashController.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dash/DashController.cpp b/dash/DashController.cpp index 54e653891..6eaec687d 100644 --- a/dash/DashController.cpp +++ b/dash/DashController.cpp @@ -352,7 +352,11 @@ void Controller::HideDash() window_->EnableInputWindow(false, dash::window_title, true, false); visible_ = false; - nux::GetWindowCompositor().SetKeyFocusArea(NULL, nux::KEY_NAV_NONE); + auto& wc = nux::GetWindowCompositor(); + auto *key_focus_area = wc.GetKeyFocusArea(); + if (key_focus_area && key_focus_area->IsChildOf(view_.GetPointer())) + wc.SetKeyFocusArea(nullptr, nux::KEY_NAV_NONE); + WindowManager::Default().RestoreInputFocus(); StartShowHideTimeline(); |
