Skip to content

Commit

Permalink
sessionLock: focus lock on creation based on mouse position (#6658)
Browse files Browse the repository at this point in the history
* sessionLock: focus lock on creation based on mouse position

* sessionLock: immediately unfocus any focused surfaces on lock
  • Loading branch information
outfoxxed authored Jun 25, 2024
1 parent c338acb commit e4d09aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/managers/SessionLockManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SSessionLockSurface::SSessionLockSurface(SP<CSessionLockSurface> surface_) : sur
listeners.map = surface_->events.map.registerListener([this](std::any data) {
mapped = true;

g_pCompositor->focusSurface(surface->surface());
g_pInputManager->simulateMouseMovement();

const auto PMONITOR = g_pCompositor->getMonitorFromID(iMonitorID);

Expand Down Expand Up @@ -78,6 +78,7 @@ void CSessionLockManager::onNewSessionLock(SP<CSessionLock> pLock) {
});

pLock->sendLocked();
g_pCompositor->focusSurface(nullptr);
}

bool CSessionLockManager::isSessionLocked() {
Expand Down

0 comments on commit e4d09aa

Please sign in to comment.