summaryrefslogtreecommitdiff
path: root/lockscreen
diff options
authorAndrea Azzarone <azzaronea@gmail.com>2016-04-05 19:11:53 +0200
committerAndrea Azzarone <azzaronea@gmail.com>2016-04-05 19:11:53 +0200
commitfb16f85634d8ecf260c128e039e108396cdbd9f9 (patch)
tree800aa71e76cb4b61c12086b7b489b3bea96c9b29 /lockscreen
parent0164c0c0b7195015af385e10321e113f84950cca (diff)
Don't call SetActive only if activate is FALSE.
(bzr r4095.2.2)
Diffstat (limited to 'lockscreen')
-rw-r--r--lockscreen/LockScreenController.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lockscreen/LockScreenController.cpp b/lockscreen/LockScreenController.cpp
index 5509ac52f..98bdd90a0 100644
--- a/lockscreen/LockScreenController.cpp
+++ b/lockscreen/LockScreenController.cpp
@@ -415,6 +415,16 @@ void Controller::OnPresenceStatusChanged(bool is_idle)
void Controller::OnScreenSaverActivationRequest(bool activate)
{
+ if (Settings::Instance().use_legacy())
+ {
+ if (activate)
+ {
+ auto proxy = std::make_shared<glib::DBusProxy>("org.gnome.ScreenSaver", "/org/gnome/ScreenSaver", "org.gnome.ScreenSaver");
+ proxy->CallBegin("SetActive", g_variant_new("(b)", activate != FALSE), [proxy] (GVariant*, glib::Error const&) {});
+ }
+ return;
+ }
+
// It looks we need to do this after a small delay, not to get the screen back on
screensaver_activation_timeout_.reset(new glib::Timeout(100, [this, activate] {
if (dbus_manager_->active() == activate)