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.
This commit is contained in:
parent
445337d03d
commit
f148b96bea
1 changed files with 4 additions and 1 deletions
|
|
@ -1707,8 +1707,11 @@ void CInputManager::releaseAllMouseButtons() {
|
||||||
if (PROTO::data->dndActive())
|
if (PROTO::data->dndActive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
timespec now;
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
|
|
||||||
for (auto const& mb : buttonsCopy) {
|
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();
|
m_lCurrentlyHeldButtons.clear();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue