diff options
| author | Andrea Azzarone <azzaronea@gmail.com> | 2014-10-21 17:43:16 +0200 |
|---|---|---|
| committer | Andrea Azzarone <azzaronea@gmail.com> | 2014-10-21 17:43:16 +0200 |
| commit | 249c6379179ff80ddad4d2409df4f277daca5371 (patch) | |
| tree | 2361d127f712be393e390c3c5503c1ae72bb65f1 /lockscreen | |
| parent | bddd3ad3768c0993e9bfdfac32fcf4cdac49c54f (diff) | |
Register for suspend after resuming.
(bzr r3874.1.11)
Diffstat (limited to 'lockscreen')
| -rw-r--r-- | lockscreen/SuspendNotifier.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lockscreen/SuspendNotifier.cpp b/lockscreen/SuspendNotifier.cpp index 1460da0ff..88c267a97 100644 --- a/lockscreen/SuspendNotifier.cpp +++ b/lockscreen/SuspendNotifier.cpp @@ -76,7 +76,6 @@ bool SuspendNotifier::Impl::RegisterInterest(SuspendCallback const& cb) LOG_ERROR(logger) << "Failed to inhbit suspend"; } delay_inhibit_fd_ = glib::Variant(variant).GetInt32(); - std::cout << "#################" << delay_inhibit_fd_ << std::endl; }); logind_proxy_->Connect("PrepareForSleep", [this](GVariant* variant) { @@ -84,17 +83,13 @@ bool SuspendNotifier::Impl::RegisterInterest(SuspendCallback const& cb) if (active) { - //g_timeout_add(0, [] (gpointer user_data) { - //Impl* self = static_cast<Impl*>(user_data); - /*self->*/cb_(); - /*self->*/UnregisterInterest(); // Actually it's just unlock the inhbit - //return FALSE; - // }, this); + cb_(); + UnregisterInterest(); // Actually it's just unlock the inhbit } - /*else + else { RegisterInterest(cb_); - }*/ + } }); return true; |
