summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2023-10-26 22:17:49 +0100
committerVaxry <vaxry@vaxry.net>2023-10-26 22:17:49 +0100
commit732b0584890bae87ab079aaa95b5b2b822b99d49 (patch)
treebf267a9b7743580c8ba3253cba10857317e707b7 /src
parent92cf1c23371e35fa352da13305d8489a9e08d540 (diff)
input: send motion events on focusWindow if follows_mouse is 0
Diffstat (limited to 'src')
-rw-r--r--src/Compositor.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 073f40f1..9b36b338 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -883,6 +883,8 @@ CMonitor* CCompositor::getMonitorFromOutput(wlr_output* out) {
void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
+ static auto* const PFOLLOWMOUSE = &g_pConfigManager->getConfigValuePtr("input:follow_mouse")->intValue;
+
if (g_pCompositor->m_sSeat.exclusiveClient) {
Debug::log(LOG, "Disallowing setting focus to a window due to there being an active input inhibitor layer.");
return;
@@ -1006,6 +1008,9 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
} else {
std::rotate(m_vWindowFocusHistory.begin(), HISTORYPIVOT, HISTORYPIVOT + 1);
}
+
+ if (*PFOLLOWMOUSE == 0)
+ g_pInputManager->sendMotionEventsToFocused();
}
void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) {