Rémi Bernon (@rbernon) commented about server/queue.c:
free_message( msg ); return; }
- if (thread->process->rawinput_kbd &&
(thread->process->rawinput_kbd->flags & RIDEV_NOLEGACY) &&
get_hardware_msg_bit( msg->msg ) == QS_KEY)
- {
free_message( msg );
return;
- }
I think the tests were showing that NOLEGACY should cause the thread keystate to not reflect the key presses (because there's no window message), but here we still update it if for some reason we couldn't find a window.
What about something like that instead? You could also probably remove the same check from queue_mouse_message while at it.
```suggestion:-14+0 static unsigned int get_rawinput_device_flags( struct process *process, struct message *msg ) { switch (get_hardware_msg_bit( msg->msg )) { case QS_KEY: return process->rawinput_kdb ? process->rawinput_kdb->flags : 0; case QS_MOUSEMOVE: case QS_MOUSEBUTTON: return process->rawinput_mouse ? process->rawinput_mouse->flags : 0; } return 0; }
/* ... */
win = find_hardware_message_window( desktop, input, msg, &msg_code, &thread ); flags = thread ? get_rawinput_device_flags( thread->process, msg ) : 0; if (!win || !thread || (flags & RIDEV_NOLEGACY)) { if (input && !(flags & RIDEV_NOLEGACY)) update_input_key_state( input->desktop, input->keystate, msg->msg, msg->wparam ); free_message( msg ); return; } ```