summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-04-09 19:53:31 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-04-09 19:53:31 +0100
commit4ae784dc5374092734a6ed30ba56011e50c902d6 (patch)
treee14c7676d2d07fabecf46f54cb03ed5e54c5b8e1 /src/managers/input/InputManager.cpp
parentdd2372d2e62de5b15fe66e46403c53ad2700f3ea (diff)
input: fix kb focus on top layers without interactive flag
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 44e3aa7f..118f21c7 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -385,7 +385,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
unsetCursorImage();
}
- if (pFoundLayerSurface && (pFoundLayerSurface->layerSurface->current.keyboard_interactive || pFoundLayerSurface->layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP) &&
+ if (pFoundLayerSurface &&
+ (pFoundLayerSurface->layerSurface->current.keyboard_interactive || (pFoundLayerSurface->layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP && !g_pCompositor->m_pLastWindow)) &&
FOLLOWMOUSE != 3 && allowKeyboardRefocus) {
g_pCompositor->focusSurface(foundSurface);
}