Module: wine Branch: master Commit: e63da6ea68e2eadf04a664f5e6660adb084f8e1e URL: https://gitlab.winehq.org/wine/wine/-/commit/e63da6ea68e2eadf04a664f5e6660ad...
Author: Alexandros Frantzis alexandros.frantzis@collabora.com Date: Fri Mar 15 10:48:09 2024 +0200
win32u: Cancel previous key auto-repeat when starting a new one.
The previous auto-repeat may be associated with a different HWND, so we cannot rely on the new timer replacing the old timer, and we don't want simultaneous repeats on different windows in the same thread.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56307
---
dlls/win32u/message.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/win32u/message.c b/dlls/win32u/message.c index 417f67452d7..44a27763bdc 100644 --- a/dlls/win32u/message.c +++ b/dlls/win32u/message.c @@ -2425,6 +2425,8 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter,
if (msg->wParam == VK_PROCESSKEY) break;
+ if (thread_info->key_repeat_msg.hwnd != msg->hwnd) + kill_system_timer( thread_info->key_repeat_msg.hwnd, SYSTEM_TIMER_KEY_REPEAT ); thread_info->key_repeat_msg = *msg; if (NtUserSystemParametersInfo( SPI_GETKEYBOARDDELAY, 0, &delay, 0 )) NtUserSetSystemTimer( msg->hwnd, SYSTEM_TIMER_KEY_REPEAT, (delay + 1) * 250 );