mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
59 lines
2.3 KiB
Diff
59 lines
2.3 KiB
Diff
|
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
|
||
|
|