summaryrefslogtreecommitdiff
path: root/user/sddm/ck2-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/sddm/ck2-support.patch')
-rw-r--r--user/sddm/ck2-support.patch85
1 files changed, 72 insertions, 13 deletions
diff --git a/user/sddm/ck2-support.patch b/user/sddm/ck2-support.patch
index 5dafe02b3..8a9e6ee85 100644
--- a/user/sddm/ck2-support.patch
+++ b/user/sddm/ck2-support.patch
@@ -1,6 +1,26 @@
---- sddm-0.16.0/src/daemon/LogindDBusTypes.cpp.old 2017-10-04 12:13:38.000000000 -0500
-+++ sddm-0.16.0/src/daemon/LogindDBusTypes.cpp 2017-10-22 17:09:43.693222846 -0500
-@@ -63,7 +63,7 @@
+diff --git a/src/daemon/LogindDBusTypes.cpp b/src/daemon/LogindDBusTypes.cpp
+index 79c7031..4ccfeb5 100644
+--- a/src/daemon/LogindDBusTypes.cpp
++++ b/src/daemon/LogindDBusTypes.cpp
+@@ -18,6 +18,7 @@ public:
+ QString sessionIfaceName;
+ QString seatIfaceName;
+ QString userIfaceName;
++ QString newSeatSignalName;
+ };
+
+ LogindPathInternal::LogindPathInternal()
+@@ -55,18 +56,20 @@ LogindPathInternal::LogindPathInternal()
+ seatIfaceName = QStringLiteral("org.freedesktop.login1.Seat");
+ sessionIfaceName = QStringLiteral("org.freedesktop.login1.Session");
+ userIfaceName = QStringLiteral("org.freedesktop.login1.User");
++ newSeatSignalName = QStringLiteral("SeatNew");
+ return;
+ }
+
+ if (QDBusConnection::systemBus().interface()->isServiceRegistered(QStringLiteral("org.freedesktop.ConsoleKit"))) {
+- qDebug() << "Console kit interface found";
++ qDebug() << "ConsoleKit interface found";
available = true;
serviceName = QStringLiteral("org.freedesktop.ConsoleKit");
managerPath = QStringLiteral("/org/freedesktop/ConsoleKit/Manager");
@@ -9,23 +29,62 @@
seatIfaceName = QStringLiteral("org.freedesktop.ConsoleKit.Seat");
sessionIfaceName = QStringLiteral("org.freedesktop.ConsoleKit.Session");
userIfaceName = QStringLiteral("org.freedesktop.ConsoleKit.User");
---- sddm-0.16.0/src/daemon/SeatManager.cpp.old 2017-10-04 12:13:38.000000000 -0500
-+++ sddm-0.16.0/src/daemon/SeatManager.cpp 2017-10-22 17:09:17.619956307 -0500
-@@ -102,7 +102,7 @@
- }
++ newSeatSignalName = QStringLiteral("SeatAdded");
+ return;
+ }
+ qDebug() << "No session manager found";
+@@ -109,3 +112,8 @@ QString Logind::userIfaceName()
+ {
+ return s_instance->userIfaceName;
+ }
++
++QString Logind::newSeatSignalName()
++{
++ return s_instance->newSeatSignalName;
++}
+diff --git a/src/daemon/LogindDBusTypes.h b/src/daemon/LogindDBusTypes.h
+index f1e8dd4..028879a 100644
+--- a/src/daemon/LogindDBusTypes.h
++++ b/src/daemon/LogindDBusTypes.h
+@@ -13,6 +13,7 @@ struct Logind
+ static QString sessionIfaceName();
+ static QString seatIfaceName();
+ static QString userIfaceName();
++ static QString newSeatSignalName();
+ };
- //fetch seats
-- auto listSeatsMsg = QDBusMessage::createMethodCall(Logind::serviceName(), Logind::managerPath(), Logind::managerIfaceName(), QStringLiteral("ListSeats"));
-+ auto listSeatsMsg = QDBusMessage::createMethodCall(Logind::serviceName(), Logind::managerPath(), Logind::managerIfaceName(), QStringLiteral("GetSeats"));
- QDBusPendingReply<NamedSeatPathList> reply = QDBusConnection::systemBus().asyncCall(listSeatsMsg);
+diff --git a/src/daemon/SeatManager.cpp b/src/daemon/SeatManager.cpp
+index c5afc57..6281ea8 100644
+--- a/src/daemon/SeatManager.cpp
++++ b/src/daemon/SeatManager.cpp
+@@ -26,6 +26,7 @@
+ #include <QDBusMessage>
+ #include <QDBusPendingReply>
+ #include <QDBusContext>
++#include <QDebug>
+
+ #include "LogindDBusTypes.h"
+
+@@ -59,6 +60,12 @@ namespace SDDM {
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply);
-@@ -113,7 +113,7 @@
+ connect(watcher, &QDBusPendingCallWatcher::finished, this, [=]() {
+ watcher->deleteLater();
++ if (Logind::serviceName().contains(QStringLiteral("ConsoleKit"))) {
++ m_canGraphical = true;
++ emit canGraphicalChanged(m_canGraphical);
++ return;
++ }
++
+ if (!reply.isValid())
+ return;
+
+@@ -113,7 +120,7 @@ namespace SDDM {
}
});
- QDBusConnection::systemBus().connect(Logind::serviceName(), Logind::managerPath(), Logind::managerIfaceName(), QStringLiteral("SeatNew"), this, SLOT(logindSeatAdded(QString,QDBusObjectPath)));
-+ QDBusConnection::systemBus().connect(Logind::serviceName(), Logind::managerPath(), Logind::managerIfaceName(), QStringLiteral("SeatAdded"), this, SLOT(logindSeatAdded(QString,QDBusObjectPath)));
++ QDBusConnection::systemBus().connect(Logind::serviceName(), Logind::managerPath(), Logind::managerIfaceName(), Logind::newSeatSignalName(), this, SLOT(logindSeatAdded(QString,QDBusObjectPath)));
QDBusConnection::systemBus().connect(Logind::serviceName(), Logind::managerPath(), Logind::managerIfaceName(), QStringLiteral("SeatRemoved"), this, SLOT(logindSeatRemoved(QString,QDBusObjectPath)));
}