[MSCTF] Sync with Wine Staging 3.9. CORE-14656
authorAmine Khaldi <amine.khaldi@reactos.org>
Mon, 4 Jun 2018 02:41:08 +0000 (03:41 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Mon, 4 Jun 2018 02:41:08 +0000 (03:41 +0100)
dll/win32/msctf/context.c
dll/win32/msctf/msctf_internal.h
dll/win32/msctf/threadmgr.c
media/doc/README.WINE

index 54052f6..452895c 100644 (file)
@@ -758,14 +758,14 @@ static HRESULT WINAPI TextStoreACPSink_OnTextChange(ITextStoreACPSink *iface,
 {
     Context *This = impl_from_ITextStoreACPSink(iface);
     FIXME("STUB:(%p)\n",This);
-    return E_NOTIMPL;
+    return S_OK;
 }
 
 static HRESULT WINAPI TextStoreACPSink_OnSelectionChange(ITextStoreACPSink *iface)
 {
     Context *This = impl_from_ITextStoreACPSink(iface);
     FIXME("STUB:(%p)\n",This);
-    return E_NOTIMPL;
+    return S_OK;
 }
 
 static HRESULT WINAPI TextStoreACPSink_OnLayoutChange(ITextStoreACPSink *iface,
@@ -773,7 +773,7 @@ static HRESULT WINAPI TextStoreACPSink_OnLayoutChange(ITextStoreACPSink *iface,
 {
     Context *This = impl_from_ITextStoreACPSink(iface);
     FIXME("STUB:(%p)\n",This);
-    return E_NOTIMPL;
+    return S_OK;
 }
 
 static HRESULT WINAPI TextStoreACPSink_OnStatusChange(ITextStoreACPSink *iface,
index d5e7fe0..9d37548 100644 (file)
@@ -31,6 +31,7 @@
 #define COOKIE_MAGIC_COMPARTMENTSINK 0x0060
 #define COOKIE_MAGIC_DMSINK 0x0070
 #define COOKIE_MAGIC_THREADFOCUSSINK 0x0080
+#define COOKIE_MAGIC_KEYTRACESINK 0x0090
 
 extern DWORD tlsIndex DECLSPEC_HIDDEN;
 extern TfClientId processId DECLSPEC_HIDDEN;
index 8ca12ac..5338e72 100644 (file)
@@ -621,6 +621,13 @@ static HRESULT WINAPI ThreadMgrSource_AdviseSink(ITfSource *iface,
         return advise_sink(&This->ThreadFocusSink, &IID_ITfThreadFocusSink, COOKIE_MAGIC_THREADFOCUSSINK, punk, pdwCookie);
     }
 
+    if (IsEqualIID(riid, &IID_ITfKeyTraceEventSink))
+    {
+        WARN("semi-stub for ITfKeyTraceEventSink: sink won't be used.\n");
+        return advise_sink(&This->KeyTraceEventSink, &IID_ITfKeyTraceEventSink,
+                           COOKIE_MAGIC_KEYTRACESINK, punk, pdwCookie);
+    }
+
     FIXME("(%p) Unhandled Sink: %s\n",This,debugstr_guid(riid));
     return E_NOTIMPL;
 }
@@ -628,10 +635,13 @@ static HRESULT WINAPI ThreadMgrSource_AdviseSink(ITfSource *iface,
 static HRESULT WINAPI ThreadMgrSource_UnadviseSink(ITfSource *iface, DWORD pdwCookie)
 {
     ThreadMgr *This = impl_from_ITfSource(iface);
+    DWORD magic;
 
     TRACE("(%p) %x\n",This,pdwCookie);
 
-    if (get_Cookie_magic(pdwCookie) != COOKIE_MAGIC_TMSINK && get_Cookie_magic(pdwCookie) != COOKIE_MAGIC_THREADFOCUSSINK)
+    magic = get_Cookie_magic(pdwCookie);
+    if (magic != COOKIE_MAGIC_TMSINK && magic != COOKIE_MAGIC_THREADFOCUSSINK
+        && magic != COOKIE_MAGIC_KEYTRACESINK)
         return E_INVALIDARG;
 
     return unadvise_sink(pdwCookie);
index 3db38f6..080c7c8 100644 (file)
@@ -106,7 +106,7 @@ reactos/dll/win32/msadp32.acm         # Synced to WineStaging-3.3
 reactos/dll/win32/mscat32             # Synced to WineStaging-3.3
 reactos/dll/win32/mscms               # Synced to WineStaging-3.3
 reactos/dll/win32/mscoree             # Synced to Wine-1.5.4
-reactos/dll/win32/msctf               # Synced to WineStaging-3.3
+reactos/dll/win32/msctf               # Synced to WineStaging-3.9
 reactos/dll/win32/msftedit            # Synced to WineStaging-3.3
 reactos/dll/win32/msg711.acm          # Synced to WineStaging-3.3
 reactos/dll/win32/msgsm32.acm         # Synced to WineStaging-3.3