Calling MFScheduleWorkItemEx() schedules the operation in the timer
queue, but unless GetParameters() returns the timer queue, callback
invocation will occur in the standard queue.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7696
XIM events are handled by Xlib internally and need to go through XFilterEvent to be processed.
This allows for keyboard input to be processed while connected to an input method daemon when an application only polls for keyboard input.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7509
Sending key events through `-[NSTextInputContext handleEvent:]`, as we do in `macdrv_send_text_input_event`, results in doubled characters for certain macOS input sources. The Romaji source does this reliably, as do certain third-party sources. (The built-in dictation does it as well, but we already blacklist that - !5660 - because it remains "active" even when it's not.)
I can't find this spelled out directly, but if you read between the lines, it seems clear that you're only supposed to send key *down* events to `-[NSTextInputContext handleEvent:]`, and not key ups. Supporting evidence:
1. [The old documentation on the text system](https://developer.apple.com/library/archive/documentation/TextFonts… only mentions `handleEvent:` being called in the context of `-keyDown:`.
2. [The guide to implementing a custom text view/NSTextInputClient](https://developer.apple.com/library/archive/documen… only mentions overriding `-keyDown:` and sending those events to `-handleEvent:`.
3. [iTerm only sends key down events to `-handleEvent:`](https://github.com/gnachman/iTerm2/blob/6134ea0a9d9d0fee5e7d7704fc98efec1fc77c24/sources/iTermKeyboardHandler.m#L355). You have to unpack the logic a bit from there, but `-handleKeyDownEvent:...` is the only method that calls `-handleEventWithCocoa:inputContext:`, which is what (usually) calls `-handleEvent:` on the `inputContext`.
4. [The InputMethodKit method on the IMKServerInput protocol to handle NSEvents directly](https://developer.apple.com/documentation/objectivec/nsobject/138… only mentions getting key down events.
So presumably input source authors sometimes do not check the type of the NSEvent they're receiving and process all key events equally, be they downs or ups.
This change fixes doubled input with Romaji and the problematic third-party method we've encountered.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7701