on xenial help sign in
Let systemd/logind handle the lid-close action

Approved by: Michael Zanetti

commit56355c820ed6ce751f4b2eec80d56e4fade24bf3 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateThu 26 Nov 2015, 13:51 (11 years ago) parentac06d54ab68920
1 file changed+2−4
plugins/Unity/Session/dbusunitysessionservice.cpp+2−4
plugins/Unity/Session/dbusunitysessionservice.cpp+2−4
@@ -84,11 +84,11 @@ public:
8484 if (m_systemdInhibitFd.isValid())
8585 return;
8686
87− // inhibit systemd handling of power/sleep/lid buttons
87+ // inhibit systemd handling of power/sleep/hibernate buttons
8888 // http://www.freedesktop.org/wiki/Software/systemd/inhibit
8989
9090 QDBusMessage msg = QDBusMessage::createMethodCall(LOGIN1_SERVICE, LOGIN1_PATH, LOGIN1_IFACE, QStringLiteral("Inhibit"));
91− msg << "handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch"; // what
91+ msg << "handle-power-key:handle-suspend-key:handle-hibernate-key"; // what
9292 msg << "Unity"; // who
9393 msg << "Unity8 handles power events"; // why
9494 msg << "block"; // mode
@@ -97,7 +97,6 @@ public:
9797 QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingCall, this);
9898 connect(watcher, &QDBusPendingCallWatcher::finished,
9999 this, [this](QDBusPendingCallWatcher* watcher) {
100−
101100 QDBusPendingReply<QDBusUnixFileDescriptor> reply = *watcher;
102101 watcher->deleteLater();
103102 if (reply.isError()) {
@@ -109,7 +108,6 @@ public:
109108 });
110109 }
111110
112−
113111 bool checkLogin1Call(const QString &method) const
114112 {
115113 QDBusMessage msg = QDBusMessage::createMethodCall(LOGIN1_SERVICE, LOGIN1_PATH, LOGIN1_IFACE, method);