summaryrefslogtreecommitdiff
path: root/src/managers/InputManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-24 11:41:52 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-24 11:41:52 +0200
commitf04829a4b5aeb8f88aaf25ce7f9b9539b0d91f65 (patch)
treef0bedbfb48db3cec919a3d3a2b01200201ac4e44 /src/managers/InputManager.cpp
parent6679a4786b593cbe5050931261566fab9aa77f1f (diff)
fix layer focus
Diffstat (limited to 'src/managers/InputManager.cpp')
-rw-r--r--src/managers/InputManager.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/managers/InputManager.cpp b/src/managers/InputManager.cpp
index 4166fd22..29f64f56 100644
--- a/src/managers/InputManager.cpp
+++ b/src/managers/InputManager.cpp
@@ -85,13 +85,15 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
foundSurface = g_pCompositor->vectorToLayerSurface(mouseCoords, &PMONITOR->m_aLayerSurfaceLists[ZWLR_LAYER_SHELL_V1_LAYER_TOP], &surfaceCoords);
// then windows
- pFoundWindow = g_pCompositor->vectorToWindowIdeal(mouseCoords);
- if (!foundSurface && pFoundWindow) {
- if (!pFoundWindow->m_bIsX11) {
- foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords);
- } else {
- foundSurface = g_pXWaylandManager->getWindowSurface(pFoundWindow);
- surfacePos = pFoundWindow->m_vRealPosition.vec();
+ if (!foundSurface) {
+ pFoundWindow = g_pCompositor->vectorToWindowIdeal(mouseCoords);
+ if (pFoundWindow) {
+ if (!pFoundWindow->m_bIsX11) {
+ foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords);
+ } else {
+ foundSurface = g_pXWaylandManager->getWindowSurface(pFoundWindow);
+ surfacePos = pFoundWindow->m_vRealPosition.vec();
+ }
}
}