From: Tim Clem tclem@codeweavers.com
After a recent OS update, the dictation input source remains "selected" in *all* apps for about 10 minutes after it is activated, even when it is not in use. There doesn't seem to be any way to determine whether it's actually active or just lingering, and sending input to it regardless means that we falsely process input as if it was going to an IME. --- dlls/winemac.drv/cocoa_app.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/winemac.drv/cocoa_app.m b/dlls/winemac.drv/cocoa_app.m index 1a8991b60f5..69138d3cef1 100644 --- a/dlls/winemac.drv/cocoa_app.m +++ b/dlls/winemac.drv/cocoa_app.m @@ -2139,9 +2139,7 @@ - (void) tryToActivateIgnoringOtherApps:(BOOL)ignore static BOOL InputSourceShouldBeIgnored(TISInputSourceRef inputSource) { /* Certain system utilities are technically input sources, but we - shouldn't consider them as such for our purposes. - Dictation is its own source too (com.apple.inputmethod.ironwood), but - it should receive keypresses; it cancels input on escape. */ + shouldn't consider them as such for our purposes. */ static CFStringRef ignoredIDs[] = { /* The "Emoji & Symbols" palette. */ CFSTR("com.apple.CharacterPaletteIM"), @@ -2151,6 +2149,11 @@ Dictation is its own source too (com.apple.inputmethod.ironwood), but CFSTR("com.apple.PressAndHold"), /* Emoji list on MacBooks with the Touch Bar. */ CFSTR("com.apple.inputmethod.EmojiFunctionRowItem"), + /* Dictation. Ideally this would actually receive key events, since + escape cancels it, but it remains a "selected" input source even + when not active, so we need to ignore it to avoid incorrectly + sending input to it. */ + CFSTR("com.apple.inputmethod.ironwood"), };
CFStringRef sourceID = TISGetInputSourceProperty(inputSource, kTISPropertyInputSourceID);