On Tue Feb 28 19:43:54 2023 +0000, Rémi Bernon wrote:
IIUC the problem is coming from one thread having a more up to date key state cache than the other because it received the X input and called `send_hardware_message`? And I understand this is caused by this part here, so what about instead:
- Remove this optimization (as well as the key state buffer returned
from `send_hardware_message` request), 2) Always invalidate the keystate for all threads by incrementing `global_key_state_counter` unconditionally in `case INPUT_KEYBOARD:` and `if (input->mi.dwFlags & ~(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_MOVE))` in `case INPUT_MOUSE:`?
Or whatever the mouse button mask should be. I think a `static const` rather than a define would be better.