aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoroutfoxxed <[email protected]>2024-09-05 17:03:12 -0700
committerGitHub <[email protected]>2024-09-06 01:03:12 +0100
commitb0fca6eaf00a2c5061f499c76ec8d60772b6a719 (patch)
tree022971863499f78958e2827bb4b66b7a3df5d54d
parent4988e00b1d72edb8ca8e87eecdbed8c2ecc6a7dc (diff)
downloadHyprland-b0fca6eaf00a2c5061f499c76ec8d60772b6a719.tar.gz
Hyprland-b0fca6eaf00a2c5061f499c76ec8d60772b6a719.zip
input: kb focus mouse focused window if unset (#7666)
Normally it shouldn't be possible to have mouse focus with no kb focus, but it does happen, and when it does this makes it considerably less annoying.
-rw-r--r--src/managers/input/InputManager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 66ca4eb2..f1035c82 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -505,6 +505,9 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
}
}
+ if (g_pSeatManager->state.keyboardFocus == nullptr)
+ g_pCompositor->focusWindow(pFoundWindow, foundSurface);
+
m_bLastFocusOnLS = false;
} else {
if (*PRESIZEONBORDER && *PRESIZECURSORICON && m_eBorderIconDirection != BORDERICON_NONE) {