input: pass touch events to lock screens (#9129)

* refactor: use weak pointers for session lock surfaces

* input: pass touch events to lock screens
This commit is contained in:
Junxuan Liao
2025-01-25 12:44:13 -06:00
committed by GitHub
parent bce58d9d65
commit 9199a9746d
6 changed files with 47 additions and 25 deletions

View File

@@ -95,20 +95,20 @@ bool CSessionLockManager::isSessionLocked() {
return PROTO::sessionLock->isLocked();
}
SSessionLockSurface* CSessionLockManager::getSessionLockSurfaceForMonitor(uint64_t id) {
WP<SSessionLockSurface> CSessionLockManager::getSessionLockSurfaceForMonitor(uint64_t id) {
if (!m_pSessionLock)
return nullptr;
return {};
for (auto const& sls : m_pSessionLock->vSessionLockSurfaces) {
if (sls->iMonitorID == id) {
if (sls->mapped)
return sls.get();
return sls;
else
return nullptr;
return {};
}
}
return nullptr;
return {};
}
// We don't want the red screen to flash.