feat: take the face in the lock screens of hyprland and niri
This commit is contained in:
1 parent
2a9b0d3f91
commit
c693ca216c
27 files changed
+1850
-1219
No files matched your search
@@ -54,7 +54,8 @@ LockWatcher::LockWatcher(QObject *parent)
|
||||
|
||||
findSession();
|
||||
|
||||
if (Wayland::hasGlobal("ext_session_lock_manager_v1")) {
|
||||
m_ownLockers = Wayland::hasGlobal("ext_session_lock_manager_v1");
|
||||
if (m_ownLockers) {
|
||||
connect(&m_poll, &QTimer::timeout, this, &LockWatcher::pollLockers);
|
||||
m_poll.start(PollMs);
|
||||
// Not from here: nobody is connected yet to hear about a lock screen
|
||||
@@ -161,6 +162,11 @@ void LockWatcher::pollLockers()
|
||||
update();
|
||||
}
|
||||
|
||||
bool LockWatcher::canUnlock() const
|
||||
{
|
||||
return !m_ownLockers || m_lockerRunning;
|
||||
}
|
||||
|
||||
void LockWatcher::update()
|
||||
{
|
||||
const bool locked = m_screenSaver || m_lockedHint || m_lockerRunning;
|
||||
|
||||
Reference in new issue
Block a user