diff options
| author | Andrea Azzarone <azzaronea@gmail.com> | 2014-05-09 17:42:31 +0200 |
|---|---|---|
| committer | Andrea Azzarone <azzaronea@gmail.com> | 2014-05-09 17:42:31 +0200 |
| commit | d02d5c8e61dd24f6a027084975f70bb9fe6835f8 (patch) | |
| tree | 080e9e841c76be5cca2e8590b970fffe1575dfef /shutdown | |
| parent | 1a9898283baefe3f29fae5462a1d88833ff973b4 (diff) | |
| parent | 06671de6ad076a8978d990f3436cca4539388909 (diff) | |
Merge trunk.
(bzr r3785.4.4)
Diffstat (limited to 'shutdown')
| -rw-r--r-- | shutdown/SessionController.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/shutdown/SessionController.cpp b/shutdown/SessionController.cpp index 5fc04a363..0aa8026a3 100644 --- a/shutdown/SessionController.cpp +++ b/shutdown/SessionController.cpp @@ -101,8 +101,8 @@ void Controller::Show(View::Mode mode, bool inhibitors) view_->live_background = true; view_window_->ShowWindow(true); - view_window_->PushToFront(); view_window_->SetInputFocus(); + nux::GetWindowCompositor().SetAlwaysOnFrontWindow(view_window_.GetPointer()); nux::GetWindowCompositor().SetKeyFocusArea(view_->key_focus_area()); animation::StartOrReverse(fade_animator_, animation::Direction::FORWARD); } @@ -175,17 +175,19 @@ void Controller::CancelAndHide() void Controller::Hide() { - animation::StartOrReverse(fade_animator_, animation::Direction::BACKWARD); + if (view_window_) + animation::StartOrReverse(fade_animator_, animation::Direction::BACKWARD); } void Controller::CloseWindow() { - view_window_->PushToBack(); - view_window_->ShowWindow(false); view_window_->UnGrabPointer(); view_window_->UnGrabKeyboard(); + view_window_->ShowWindow(false); view_window_->EnableInputWindow(false); - view_->live_background = false; + + view_ = nullptr; + view_window_ = nullptr; nux::GetWindowCompositor().SetKeyFocusArea(nullptr); WindowManager::Default().RestoreInputFocus(); |
