aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorZach DeCook <[email protected]>2024-03-30 20:50:25 -0400
committerGitHub <[email protected]>2024-03-31 00:50:25 +0000
commit1cc9a44318e53a34f41cc36483502de985b88cf8 (patch)
treee8787a978b468b4bb6494942251225cfadedd1a0 /src/managers/input/InputManager.cpp
parent5e8c25d498ed5cb7852ae74a876b0c138a62d59d (diff)
downloadHyprland-1cc9a44318e53a34f41cc36483502de985b88cf8.tar.gz
Hyprland-1cc9a44318e53a34f41cc36483502de985b88cf8.zip
input: Fix incorrect keyboard focus taken when no window was present (#5337)
A non-keyboard layer never needs keyboard focus
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 690463fa..4e2bf709 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -422,10 +422,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
unsetCursorImage();
}
- if (pFoundLayerSurface &&
- (pFoundLayerSurface->layerSurface->current.keyboard_interactive != ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE ||
- (pFoundLayerSurface->layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP && !g_pCompositor->m_pLastWindow)) &&
- FOLLOWMOUSE != 3 && allowKeyboardRefocus) {
+ if (pFoundLayerSurface && (pFoundLayerSurface->layerSurface->current.keyboard_interactive != ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE) && FOLLOWMOUSE != 3 &&
+ allowKeyboardRefocus) {
g_pCompositor->focusSurface(foundSurface);
}