mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-17 21:13:48 -07: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:
@@ -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() {
|
||||||
|
Reference in New Issue
Block a user