mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 19:05:59 +01:00
sessionLock: fix focus not being tied to mouse (#6414)
This commit is contained in:
parent
90d0097716
commit
809820921d
1 changed files with 7 additions and 4 deletions
|
@ -155,6 +155,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
|||
Vector2D surfacePos = Vector2D(-1337, -1337);
|
||||
PHLWINDOW pFoundWindow;
|
||||
PHLLS pFoundLayerSurface;
|
||||
SSessionLockSurface* pSessionLock = nullptr;
|
||||
|
||||
if (!g_pCompositor->m_bReadyToProcess || g_pCompositor->m_bIsShuttingDown || g_pCompositor->m_bUnsafeState)
|
||||
return;
|
||||
|
@ -261,12 +262,12 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
|||
g_pCompositor->setActiveMonitor(PMONITOR);
|
||||
|
||||
if (g_pSessionLockManager->isSessionLocked()) {
|
||||
const auto PSLS = PMONITOR ? g_pSessionLockManager->getSessionLockSurfaceForMonitor(PMONITOR->ID) : nullptr;
|
||||
pSessionLock = PMONITOR ? g_pSessionLockManager->getSessionLockSurfaceForMonitor(PMONITOR->ID) : nullptr;
|
||||
|
||||
if (!PSLS)
|
||||
if (!pSessionLock)
|
||||
return;
|
||||
|
||||
foundSurface = PSLS->surface->surface();
|
||||
foundSurface = pSessionLock->surface->surface();
|
||||
surfacePos = PMONITOR->vecPosition;
|
||||
}
|
||||
|
||||
|
@ -455,7 +456,9 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
|||
restoreCursorIconToApp();
|
||||
}
|
||||
|
||||
if (pFoundWindow) {
|
||||
if (pSessionLock != nullptr)
|
||||
g_pCompositor->focusSurface(foundSurface);
|
||||
else if (pFoundWindow) {
|
||||
// change cursor icon if hovering over border
|
||||
if (*PRESIZEONBORDER && *PRESIZECURSORICON) {
|
||||
if (!pFoundWindow->m_bIsFullscreen && !pFoundWindow->hasPopupAt(mouseCoords)) {
|
||||
|
|
Loading…
Reference in a new issue