diff options
| author | Ted Gould <ted@gould.cx> | 2016-07-20 16:44:32 +0200 | 
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2016-07-20 16:44:32 +0200 | 
| commit | 01b30314870ddb70733e20e57f84ddabee4d1545 (patch) | |
| tree | 4aca625cb52a3178d5e9021f97f73c857fb6c4b3 /lockscreen | |
| parent | 15d1574e529aaefcc2566b1fa1b5e529eaa1214c (diff) | |
Add systemd events to the lock screen
(bzr r4153.9.5)
Diffstat (limited to 'lockscreen')
| -rw-r--r-- | lockscreen/LockScreenController.cpp | 4 | ||||
| -rw-r--r-- | lockscreen/LockScreenController.h | 3 | 
2 files changed, 7 insertions, 0 deletions
diff --git a/lockscreen/LockScreenController.cpp b/lockscreen/LockScreenController.cpp index 0818f21a9..807bfa53c 100644 --- a/lockscreen/LockScreenController.cpp +++ b/lockscreen/LockScreenController.cpp @@ -56,6 +56,7 @@ DECLARE_LOGGER(logger, "unity.lockscreen");  Controller::Controller(DBusManager::Ptr const& dbus_manager,  session::Manager::Ptr const& session_manager,  key::Grabber::Ptr const& key_grabber, + SystemdWrapper::Ptr const& systemd_wrapper,  UpstartWrapper::Ptr const& upstart_wrapper,  ShieldFactoryInterface::Ptr const& shield_factory,  bool test_mode) @@ -63,6 +64,7 @@ Controller::Controller(DBusManager::Ptr const& dbus_manager,  , dbus_manager_(dbus_manager)  , session_manager_(session_manager)  , key_grabber_(key_grabber) + , systemd_wrapper_(systemd_wrapper)  , upstart_wrapper_(upstart_wrapper)  , shield_factory_(shield_factory)  , suspend_inhibitor_manager_(std::make_shared<SuspendInhibitorManager>()) @@ -129,6 +131,7 @@ Controller::Controller(DBusManager::Ptr const& dbus_manager,  shields_.clear();  upstart_wrapper_->Emit("desktop-unlock"); + systemd_wrapper_->Stop("unity-screen-locked.target");  accelerator_controller_.reset();  indicators_.reset();  } @@ -464,6 +467,7 @@ void Controller::LockScreen()  {  indicators_ = std::make_shared<indicator::LockScreenDBusIndicators>();  upstart_wrapper_->Emit("desktop-lock"); + systemd_wrapper_->Stop("unity-screen-locked.target");  accelerator_controller_ = std::make_shared<AcceleratorController>(key_grabber_);  auto activate_key = WindowManager::Default().activate_indicators_key(); diff --git a/lockscreen/LockScreenController.h b/lockscreen/LockScreenController.h index c5f47ef13..8f7cbf3c5 100644 --- a/lockscreen/LockScreenController.h +++ b/lockscreen/LockScreenController.h @@ -31,6 +31,7 @@  #include "ScreenSaverDBusManager.h"  #include "unity-shared/BackgroundEffectHelper.h"  #include "unity-shared/KeyGrabber.h" +#include "unity-shared/SystemdWrapper.h"  #include "unity-shared/UpstartWrapper.h"  namespace unity @@ -46,6 +47,7 @@ public:  typedef std::shared_ptr<Controller> Ptr;  Controller(DBusManager::Ptr const&, session::Manager::Ptr const&, key::Grabber::Ptr const&, + SystemdWrapper::Ptr const& systemd_wrapper = std::make_shared<SystemdWrapper>(),  UpstartWrapper::Ptr const& upstart_wrapper = std::make_shared<UpstartWrapper>(),  ShieldFactoryInterface::Ptr const& shield_factory = std::make_shared<ShieldFactory>(),  bool test_mode = false); @@ -88,6 +90,7 @@ private:  key::Grabber::Ptr key_grabber_;  indicator::Indicators::Ptr indicators_;  AcceleratorController::Ptr accelerator_controller_; + SystemdWrapper::Ptr systemd_wrapper_;  UpstartWrapper::Ptr upstart_wrapper_;  ShieldFactoryInterface::Ptr shield_factory_;  SuspendInhibitorManager::Ptr suspend_inhibitor_manager_;  | 
