diff options
author | Vaxry <[email protected]> | 2023-10-22 23:32:37 +0100 |
---|---|---|
committer | Vaxry <[email protected]> | 2023-10-22 23:32:55 +0100 |
commit | 98059b52d759965916e0185ca35a01cc20a797b6 (patch) | |
tree | c5ac28cbbab9ddb71cbacf31fa5f9370641ece85 /src/managers | |
parent | b135bd6cd4c27a9fd94dfa084e75188463c2eb3b (diff) | |
download | Hyprland-98059b52d759965916e0185ca35a01cc20a797b6.tar.gz Hyprland-98059b52d759965916e0185ca35a01cc20a797b6.zip |
layershell: support ON_DEMAND keyboard mode
fixes #2264
Diffstat (limited to 'src/managers')
-rw-r--r-- | src/managers/input/InputManager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 1d8b5135..3fe892c1 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -335,12 +335,11 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { bool allowKeyboardRefocus = true; - if (*PHOGFOCUS && !refocus && g_pCompositor->m_pLastFocus) { + if (!refocus && g_pCompositor->m_pLastFocus) { const auto PLS = g_pCompositor->getLayerSurfaceFromSurface(g_pCompositor->m_pLastFocus); - if (PLS && PLS->layerSurface->current.keyboard_interactive) { + if (PLS && PLS->layerSurface->current.keyboard_interactive == ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE) allowKeyboardRefocus = false; - } } // set the values for use @@ -407,7 +406,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { } if (pFoundLayerSurface && - (pFoundLayerSurface->layerSurface->current.keyboard_interactive || (pFoundLayerSurface->layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP && !g_pCompositor->m_pLastWindow)) && + (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) { g_pCompositor->focusSurface(foundSurface); } |