input: avoid using the wrong surface in drag focus force

This commit is contained in:
vaxerski 2023-09-23 17:20:39 +01:00
parent 8252957392
commit 3b445ec849

View file

@ -189,7 +189,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
if (!m_sDrag.drag && !m_lCurrentlyHeldButtons.empty() && g_pCompositor->m_pLastFocus) { if (!m_sDrag.drag && !m_lCurrentlyHeldButtons.empty() && g_pCompositor->m_pLastFocus) {
if (m_bLastFocusOnLS) { if (m_bLastFocusOnLS) {
foundSurface = g_pCompositor->m_pLastFocus; foundSurface = m_pLastMouseSurface;
pFoundLayerSurface = g_pCompositor->getLayerSurfaceFromSurface(foundSurface); pFoundLayerSurface = g_pCompositor->getLayerSurfaceFromSurface(foundSurface);
if (pFoundLayerSurface) { if (pFoundLayerSurface) {
surfacePos = g_pCompositor->getLayerSurfaceFromSurface(foundSurface)->position; surfacePos = g_pCompositor->getLayerSurfaceFromSurface(foundSurface)->position;