2019-07-31 15:46:58 -07:00
|
|
|
From 48b2daa4ddeb8c3a88611bc494a0e1405fad37af Mon Sep 17 00:00:00 2001
|
2019-07-14 15:35:24 -07:00
|
|
|
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 +
|
2019-07-31 15:46:58 -07:00
|
|
|
dlls/msctf/threadmgr.c | 10 +++++++++-
|
|
|
|
2 files changed, 10 insertions(+), 1 deletion(-)
|
2019-07-14 15:35:24 -07:00
|
|
|
|
|
|
|
diff --git a/dlls/msctf/msctf_internal.h b/dlls/msctf/msctf_internal.h
|
2019-07-31 15:46:58 -07:00
|
|
|
index 584bb1044ed..9d60e18e6f3 100644
|
2019-07-14 15:35:24 -07:00
|
|
|
--- a/dlls/msctf/msctf_internal.h
|
|
|
|
+++ b/dlls/msctf/msctf_internal.h
|
2019-07-31 15:46:58 -07:00
|
|
|
@@ -34,6 +34,7 @@
|
2019-07-14 15:35:24 -07:00
|
|
|
#define COOKIE_MAGIC_KEYTRACESINK 0x0090
|
2019-07-31 15:46:58 -07:00
|
|
|
#define COOKIE_MAGIC_UIELEMENTSINK 0x00a0
|
|
|
|
#define COOKIE_MAGIC_INPUTPROCESSORPROFILEACTIVATIONSINK 0x00b0
|
|
|
|
+#define COOKIE_MAGIC_ACTIVELANGSINK 0x00c0
|
2019-07-14 15:35:24 -07:00
|
|
|
|
|
|
|
extern DWORD tlsIndex DECLSPEC_HIDDEN;
|
|
|
|
extern TfClientId processId DECLSPEC_HIDDEN;
|
|
|
|
diff --git a/dlls/msctf/threadmgr.c b/dlls/msctf/threadmgr.c
|
2019-07-31 15:46:58 -07:00
|
|
|
index 2c208fbc04f..16e261539ac 100644
|
2019-07-14 15:35:24 -07:00
|
|
|
--- a/dlls/msctf/threadmgr.c
|
|
|
|
+++ b/dlls/msctf/threadmgr.c
|
2019-07-31 15:46:58 -07:00
|
|
|
@@ -621,6 +621,13 @@ static HRESULT WINAPI ThreadMgrSource_AdviseSink(ITfSource *iface,
|
2019-07-14 15:35:24 -07:00
|
|
|
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");
|
2019-07-31 15:46:58 -07:00
|
|
|
@@ -656,7 +663,8 @@ static HRESULT WINAPI ThreadMgrSource_UnadviseSink(ITfSource *iface, DWORD pdwCo
|
2019-07-14 15:35:24 -07:00
|
|
|
magic = get_Cookie_magic(pdwCookie);
|
2019-07-31 15:46:58 -07:00
|
|
|
if (magic != COOKIE_MAGIC_TMSINK && magic != COOKIE_MAGIC_THREADFOCUSSINK
|
|
|
|
&& magic != COOKIE_MAGIC_KEYTRACESINK && magic != COOKIE_MAGIC_UIELEMENTSINK
|
|
|
|
- && magic != COOKIE_MAGIC_INPUTPROCESSORPROFILEACTIVATIONSINK)
|
|
|
|
+ && magic != COOKIE_MAGIC_INPUTPROCESSORPROFILEACTIVATIONSINK
|
|
|
|
+ && magic != COOKIE_MAGIC_KEYTRACESINK)
|
2019-07-14 15:35:24 -07:00
|
|
|
return E_INVALIDARG;
|
|
|
|
|
|
|
|
return unadvise_sink(pdwCookie);
|
|
|
|
--
|
|
|
|
2.17.1
|
|
|
|
|