summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorIndy Ray <iray@telltale.com>2025-03-01 07:53:30 -0800
committerGitHub <noreply@github.com>2025-03-01 16:53:30 +0100
commitf148b96beae2f6e1a0bf94292ab6b6f595228140 (patch)
tree67f1a512437f677b3b353e686cf7463877e4e422 /src/managers/input/InputManager.cpp
parent445337d03dce7c9aef10ff4d57fc516ac8c1b24d (diff)
input: Provide a non-zero time for button release triggered during window unmap. (#9513)
It doesn't seem that this is actually required, but it seems more consistant with other areas, such as in CVirtualKeyboardV1Resource::releasePressed.
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index 1d16f915..dffbddc2 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -1707,8 +1707,11 @@ void CInputManager::releaseAllMouseButtons() {
if (PROTO::data->dndActive())
return;
+ timespec now;
+ clock_gettime(CLOCK_MONOTONIC, &now);
+
for (auto const& mb : buttonsCopy) {
- g_pSeatManager->sendPointerButton(0, mb, WL_POINTER_BUTTON_STATE_RELEASED);
+ g_pSeatManager->sendPointerButton(now.tv_sec * 1000 + now.tv_nsec / 1000000, mb, WL_POINTER_BUTTON_STATE_RELEASED);
}
m_lCurrentlyHeldButtons.clear();