sessionLock: focus lock on creation based on mouse position (#6658)

* sessionLock: focus lock on creation based on mouse position

* sessionLock: immediately unfocus any focused surfaces on lock
This commit is contained in:
outfoxxed 2024-06-25 14:22:38 -07:00 committed by GitHub
parent c338acbb7d
commit e4d09aa3a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,7 +10,7 @@ SSessionLockSurface::SSessionLockSurface(SP<CSessionLockSurface> surface_) : sur
listeners.map = surface_->events.map.registerListener([this](std::any data) { listeners.map = surface_->events.map.registerListener([this](std::any data) {
mapped = true; mapped = true;
g_pCompositor->focusSurface(surface->surface()); g_pInputManager->simulateMouseMovement();
const auto PMONITOR = g_pCompositor->getMonitorFromID(iMonitorID); const auto PMONITOR = g_pCompositor->getMonitorFromID(iMonitorID);
@ -78,6 +78,7 @@ void CSessionLockManager::onNewSessionLock(SP<CSessionLock> pLock) {
}); });
pLock->sendLocked(); pLock->sendLocked();
g_pCompositor->focusSurface(nullptr);
} }
bool CSessionLockManager::isSessionLocked() { bool CSessionLockManager::isSessionLocked() {