summaryrefslogtreecommitdiff
path: root/lockscreen
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2014-04-30 17:01:34 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2014-04-30 17:01:34 +0200
commit00bb7e1c8f4158ede46de95dbb36ab4a377fd45e (patch)
treedd31951fd54dd7a575e67cd8af621098750c18a2 /lockscreen
parent4edaec46c1f0dae67ce4f658c36058575125b000 (diff)
LockScreenController: set the primary shield as the always on front window when another basewindow hides
That window might have set itself as the always on front window, so we should restore our role (bzr r3791.1.10)
Diffstat (limited to 'lockscreen')
-rw-r--r--lockscreen/LockScreenController.cpp9
-rw-r--r--lockscreen/LockScreenController.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/lockscreen/LockScreenController.cpp b/lockscreen/LockScreenController.cpp
index 20130ff03..0314cf6fd 100644
--- a/lockscreen/LockScreenController.cpp
+++ b/lockscreen/LockScreenController.cpp
@@ -69,9 +69,14 @@ Controller::Controller(DBusManager::Ptr const& dbus_manager,
EnsureShields(monitors);
EnsureBlankWindow();
});
-
uscreen_connection_->block();
+ hidden_window_connection_ = nux::GetWindowCompositor().sigHiddenViewWindow.connect([this] (nux::BaseWindow*) {
+ // Another view (i.e. the shutdown dialog) might have taken the role of AlwaysOnFront window
+ nux::GetWindowCompositor().SetAlwaysOnFrontWindow(primary_shield_.GetPointer());
+ });
+ hidden_window_connection_->block();
+
suspend_connection_ = uscreen->suspending.connect([this] {
if (Settings::Instance().lock_on_suspend())
session_manager_->PromptLockScreen();
@@ -98,6 +103,7 @@ Controller::Controller(DBusManager::Ptr const& dbus_manager,
motion_connection_->disconnect();
key_connection_->disconnect();
uscreen_connection_->block();
+ hidden_window_connection_->block();
session_manager_->unlocked.emit();
std::for_each(shields_.begin(), shields_.end(), [](nux::ObjectPtr<Shield> const& shield) {
@@ -402,6 +408,7 @@ void Controller::ShowShields()
WindowManager::Default().SaveInputFocus();
EnsureShields(UScreen::GetDefault()->GetMonitors());
uscreen_connection_->unblock();
+ hidden_window_connection_->unblock();
std::for_each(shields_.begin(), shields_.end(), [] (nux::ObjectPtr<Shield> const& shield) {
shield->SetOpacity(0.0f);
diff --git a/lockscreen/LockScreenController.h b/lockscreen/LockScreenController.h
index 434b95c13..1c43fa49a 100644
--- a/lockscreen/LockScreenController.h
+++ b/lockscreen/LockScreenController.h
@@ -86,6 +86,7 @@ private:
connection::Wrapper uscreen_connection_;
connection::Wrapper suspend_connection_;
+ connection::Wrapper hidden_window_connection_;
connection::Wrapper motion_connection_;
connection::Wrapper key_connection_;