aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoroutfoxxed <[email protected]>2024-06-25 14:22:38 -0700
committerGitHub <[email protected]>2024-06-25 23:22:38 +0200
commite4d09aa3a9de9a9e71c10bf4b6800585b3db9a4c (patch)
tree32a14343f821d6b5cb704cbe609b7dfa6d3d3010
parentc338acbb7dc64a735dadd0ae54f3b17d85a2a467 (diff)
downloadHyprland-e4d09aa3a9de9a9e71c10bf4b6800585b3db9a4c.tar.gz
Hyprland-e4d09aa3a9de9a9e71c10bf4b6800585b3db9a4c.zip
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
-rw-r--r--src/managers/SessionLockManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/managers/SessionLockManager.cpp b/src/managers/SessionLockManager.cpp
index 3bec1c4b..b4695e0e 100644
--- a/src/managers/SessionLockManager.cpp
+++ b/src/managers/SessionLockManager.cpp
@@ -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() {