diff options
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; |
