diff options
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();  | 
