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
This commit is contained in:
parent
913d6cca47
commit
f6e93aedb2
2 changed files with 8 additions and 0 deletions
|
@ -438,6 +438,9 @@ void LogindIntegration::getSeat()
|
|||
if (m_seatPath != seatPath) {
|
||||
m_seatPath = seatPath;
|
||||
}
|
||||
if (m_seatName != seat.name) {
|
||||
m_seatName = seat.name;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
5
logind.h
5
logind.h
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue