Commit f6e93aed authored by Nerdopolis Turfwalker's avatar Nerdopolis Turfwalker Committed by Albert Astals Cid

logind: Add a function that detects the logind seat.

Summary:
This will allow other parts of kwin to get the current logind seat that this instance is running under

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, anthonyfieroni, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D9551
parent 913d6cca
......@@ -438,6 +438,9 @@ void LogindIntegration::getSeat()
if (m_seatPath != seatPath) {
m_seatPath = seatPath;
}
if (m_seatName != seat.name) {
m_seatName = seat.name;
}
}
);
}
......
......@@ -56,6 +56,10 @@ public:
int takeDevice(const char *path);
void releaseDevice(int fd);
const QString seat() const {
return m_seatName;
}
Q_SIGNALS:
void connectedChanged();
void hasSessionControlChanged(bool);
......@@ -91,6 +95,7 @@ private:
bool m_sessionControl;
bool m_sessionActive;
int m_vt = -1;
QString m_seatName = QStringLiteral("seat0");
QString m_seatPath;
QString m_sessionControllerName;
QString m_sessionControllerService;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment