mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 19:49:49 +01:00
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:
parent
c338acbb7d
commit
e4d09aa3a9
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
@ -78,6 +78,7 @@ void CSessionLockManager::onNewSessionLock(SP<CSessionLock> pLock) {
|
|||
});
|
||||
|
||||
pLock->sendLocked();
|
||||
g_pCompositor->focusSurface(nullptr);
|
||||
}
|
||||
|
||||
bool CSessionLockManager::isSessionLocked() {
|
||||
|
|
Loading…
Reference in a new issue