Added msctf-ITfActiveLanguageProfileNotifySink patchset

This commit is contained in:
Alistair Leslie-Hughes 2019-07-15 08:35:24 +10:00
parent 1b15ab1bdc
commit 944b464511
3 changed files with 78 additions and 0 deletions

View File

@ -0,0 +1,58 @@
From dec04ef411b2ae2fa1eed07e447e0a1090191cee Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 12 Jul 2019 09:50:00 +1000
Subject: [PATCH] msctf: Added ITfActiveLanguageProfileNotifySink support in
ITfSource.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44502
---
dlls/msctf/msctf_internal.h | 1 +
dlls/msctf/threadmgr.c | 13 +++++++++++--
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/msctf/msctf_internal.h b/dlls/msctf/msctf_internal.h
index 9d37548361..35843eecf9 100644
--- a/dlls/msctf/msctf_internal.h
+++ b/dlls/msctf/msctf_internal.h
@@ -32,6 +32,7 @@
#define COOKIE_MAGIC_DMSINK 0x0070
#define COOKIE_MAGIC_THREADFOCUSSINK 0x0080
#define COOKIE_MAGIC_KEYTRACESINK 0x0090
+#define COOKIE_MAGIC_ACTIVELANGSINK 0x0100
extern DWORD tlsIndex DECLSPEC_HIDDEN;
extern TfClientId processId DECLSPEC_HIDDEN;
diff --git a/dlls/msctf/threadmgr.c b/dlls/msctf/threadmgr.c
index a9fcb5cd15..fac11e7a35 100644
--- a/dlls/msctf/threadmgr.c
+++ b/dlls/msctf/threadmgr.c
@@ -617,6 +617,13 @@ static HRESULT WINAPI ThreadMgrSource_AdviseSink(ITfSource *iface,
return advise_sink(&This->ThreadFocusSink, &IID_ITfThreadFocusSink, COOKIE_MAGIC_THREADFOCUSSINK, punk, pdwCookie);
}
+ if (IsEqualIID(riid, &IID_ITfActiveLanguageProfileNotifySink))
+ {
+ WARN("semi-stub for ITfActiveLanguageProfileNotifySink: sink won't be used.\n");
+ return advise_sink(&This->ActiveLanguageProfileNotifySink, &IID_ITfActiveLanguageProfileNotifySink,
+ COOKIE_MAGIC_ACTIVELANGSINK, punk, pdwCookie);
+ }
+
if (IsEqualIID(riid, &IID_ITfKeyTraceEventSink))
{
WARN("semi-stub for ITfKeyTraceEventSink: sink won't be used.\n");
@@ -636,8 +643,10 @@ static HRESULT WINAPI ThreadMgrSource_UnadviseSink(ITfSource *iface, DWORD pdwCo
TRACE("(%p) %x\n",This,pdwCookie);
magic = get_Cookie_magic(pdwCookie);
- if (magic != COOKIE_MAGIC_TMSINK && magic != COOKIE_MAGIC_THREADFOCUSSINK
- && magic != COOKIE_MAGIC_KEYTRACESINK)
+ if (magic != COOKIE_MAGIC_TMSINK &&
+ magic != COOKIE_MAGIC_THREADFOCUSSINK &&
+ magic != COOKIE_MAGIC_ACTIVELANGSINK &&
+ magic != COOKIE_MAGIC_KEYTRACESINK)
return E_INVALIDARG;
return unadvise_sink(pdwCookie);
--
2.17.1

View File

@ -0,0 +1 @@
Fixes: [44502] msctf: Added ITfActiveLanguageProfileNotifySink support in ITfSource.

View File

@ -172,6 +172,7 @@ patch_enable_all ()
enable_mmsystem_dll16_MIDIHDR_Refcount="$1"
enable_mountmgr_DosDevices="$1"
enable_mscoree_CorValidateImage="$1"
enable_msctf_ITfActiveLanguageProfileNotifySink="$1"
enable_mshtml_HTMLLocation_put_hash="$1"
enable_mshtml_TranslateAccelerator="$1"
enable_msi_msi_vcl_get_cost="$1"
@ -647,6 +648,9 @@ patch_enable ()
mscoree-CorValidateImage)
enable_mscoree_CorValidateImage="$2"
;;
msctf-ITfActiveLanguageProfileNotifySink)
enable_msctf_ITfActiveLanguageProfileNotifySink="$2"
;;
mshtml-HTMLLocation_put_hash)
enable_mshtml_HTMLLocation_put_hash="$2"
;;
@ -4498,6 +4502,21 @@ if test "$enable_mscoree_CorValidateImage" -eq 1; then
) >> "$patchlist"
fi
# Patchset msctf-ITfActiveLanguageProfileNotifySink
# |
# | This patchset fixes the following Wine bugs:
# | * [#44502] msctf: Added ITfActiveLanguageProfileNotifySink support in ITfSource.
# |
# | Modified files:
# | * dlls/msctf/msctf_internal.h, dlls/msctf/threadmgr.c
# |
if test "$enable_msctf_ITfActiveLanguageProfileNotifySink" -eq 1; then
patch_apply msctf-ITfActiveLanguageProfileNotifySink/0001-msctf-Added-ITfActiveLanguageProfileNotifySink-suppo.patch
(
printf '%s\n' '+ { "Alistair Leslie-Hughes", "msctf: Added ITfActiveLanguageProfileNotifySink support in ITfSource.", 1 },';
) >> "$patchlist"
fi
# Patchset mshtml-HTMLLocation_put_hash
# |
# | This patchset fixes the following Wine bugs: