summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2025-08-20 13:01:31 +0200
committervaxerski <vaxry@vaxry.net>2025-08-20 13:01:31 +0200
commit1ac1ff457ab8ef1ae6a8f2ab17ee7965adfa729f (patch)
treea9b9cfa56423f72e717567d43f98be58ec61e93a /src/managers/input/InputManager.cpp
parent9a202069454d2fab4691bad6620547b271aad93c (diff)
touch: detach from pointer input
this detaches touch from pointer input. Touch should not affect where your cursor is, and it doesn't make much sense for it to move when we use touch
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index f8d2a160..dff97166 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -164,13 +164,13 @@ void CInputManager::sendMotionEventsToFocused() {
g_pSeatManager->setPointerFocus(g_pCompositor->m_lastFocus.lock(), LOCAL);
}
-void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse) {
+void CInputManager::mouseMoveUnified(uint32_t time, bool refocus, bool mouse, std::optional<Vector2D> overridePos) {
m_lastInputMouse = mouse;
if (!g_pCompositor->m_readyToProcess || g_pCompositor->m_isShuttingDown || g_pCompositor->m_unsafeState)
return;
- Vector2D const mouseCoords = getMouseCoordsInternal();
+ Vector2D const mouseCoords = overridePos.value_or(getMouseCoordsInternal());
auto const MOUSECOORDSFLOORED = mouseCoords.floor();
if (MOUSECOORDSFLOORED == m_lastCursorPosFloored && !refocus)
@@ -1488,8 +1488,8 @@ bool CInputManager::shouldIgnoreVirtualKeyboard(SP<IKeyboard> pKeyboard) {
return !pKeyboard || (client && !m_relay.m_inputMethod.expired() && m_relay.m_inputMethod->grabClient() == client);
}
-void CInputManager::refocus() {
- mouseMoveUnified(0, true);
+void CInputManager::refocus(std::optional<Vector2D> overridePos) {
+ mouseMoveUnified(0, true, false, overridePos);
}
bool CInputManager::refocusLastWindow(PHLMONITOR pMonitor) {