diff options
| author | Andrea Azzarone <azzaronea@gmail.com> | 2014-03-24 22:36:55 +0100 |
|---|---|---|
| committer | Andrea Azzarone <azzaronea@gmail.com> | 2014-03-24 22:36:55 +0100 |
| commit | 9616465757b63ade1878826e5aac73852b5af7cb (patch) | |
| tree | 4f80b7677c507e9ea5d3da0cb82db8f8ee29217a /lockscreen | |
| parent | 888682ae5202ba251e9d4436648c112f8fd0d916 (diff) | |
Use reset and remove the layout manually to avoid crashes.
(bzr r3736.1.2)
Diffstat (limited to 'lockscreen')
| -rw-r--r-- | lockscreen/LockScreenAbstractShield.h | 1 | ||||
| -rw-r--r-- | lockscreen/LockScreenController.cpp | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lockscreen/LockScreenAbstractShield.h b/lockscreen/LockScreenAbstractShield.h index 584a66fe3..a9e993196 100644 --- a/lockscreen/LockScreenAbstractShield.h +++ b/lockscreen/LockScreenAbstractShield.h @@ -45,6 +45,7 @@ public: nux::Property<bool> primary; nux::Property<int> monitor; + using MockableBaseWindow::RemoveLayout; virtual bool IsIndicatorOpen() const = 0; sigc::signal<void, int, int> grab_motion; diff --git a/lockscreen/LockScreenController.cpp b/lockscreen/LockScreenController.cpp index 6904ee075..3385d0ef3 100644 --- a/lockscreen/LockScreenController.cpp +++ b/lockscreen/LockScreenController.cpp @@ -74,6 +74,11 @@ Controller::Controller(session::Manager::Ptr const& session_manager, motion_connection_->disconnect(); uscreen_connection_->block(); session_manager_->unlocked.emit(); + + std::for_each(shields_.begin(), shields_.end(), [](nux::ObjectPtr<Shield> const& shield) { + shield->RemoveLayout(); + }); + shields_.clear(); if (Settings::Instance().lockscreen_type() == Type::UNITY) @@ -231,7 +236,7 @@ void Controller::ShowShields() void Controller::OnUnlockRequested() { - lockscreen_timeout_.release(); + lockscreen_timeout_.reset(); if (!IsLocked()) return; |
