diff options
| author | vaxerski <vaxry@vaxry.net> | 2024-07-27 17:49:27 +0200 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2024-07-27 17:49:35 +0200 |
| commit | 729b47d46d0c749efbffe01ea863a124fad562b4 (patch) | |
| tree | f2abe24cb709c3d97d809aa8e7f97a9bad20c332 /src/managers/input/InputManager.cpp | |
| parent | 84227eb587688596b63a5b48848d32083d9680cf (diff) | |
input: refocus last window on keyboard unfocusable surfaces
fixes #4460
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index e2c62367..7d2e7a0e 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -17,6 +17,7 @@ #include "../../protocols/LayerShell.hpp" #include "../../protocols/core/Seat.hpp" #include "../../protocols/core/DataDevice.hpp" +#include "../../protocols/core/Compositor.hpp" #include "../../protocols/XDGShell.hpp" #include "../../devices/Mouse.hpp" @@ -1382,6 +1383,12 @@ void CInputManager::refocusLastWindow(CMonitor* pMonitor) { g_pCompositor->focusWindow(PLASTWINDOW); } else { // otherwise fall back to a normal refocus. + + if (foundSurface && !foundSurface->hlSurface->keyboardFocusable()) { + const auto PLASTWINDOW = g_pCompositor->m_pLastWindow.lock(); + g_pCompositor->focusWindow(PLASTWINDOW); + } + refocus(); } } |
