input: lock focus to last surface on buttons held

fixes #3385
This commit is contained in:
vaxerski 2023-09-20 19:50:44 +01:00
parent ef94375882
commit 62efc045d7

View file

@ -204,10 +204,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
foundSurface = g_pCompositor->m_pLastFocus; foundSurface = g_pCompositor->m_pLastFocus;
pFoundWindow = g_pCompositor->m_pLastWindow; pFoundWindow = g_pCompositor->m_pLastWindow;
if (!g_pCompositor->m_pLastWindow->m_bIsX11) surfacePos = g_pCompositor->m_pLastWindow->m_vRealPosition.vec();
foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, g_pCompositor->m_pLastWindow, surfaceCoords);
else
surfacePos = g_pCompositor->m_pLastWindow->m_vRealPosition.vec();
m_bFocusHeldByButtons = true; m_bFocusHeldByButtons = true;
m_bRefocusHeldByButtons = refocus; m_bRefocusHeldByButtons = refocus;