mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
38 lines
1.0 KiB
Diff
38 lines
1.0 KiB
Diff
|
From f103e65ee8d05b6688dcecb4da039b1bd5714eb9 Mon Sep 17 00:00:00 2001
|
||
|
From: Sebastian Lackner <sebastian@fds-team.de>
|
||
|
Date: Sun, 1 Mar 2015 05:08:20 +0100
|
||
|
Subject: msctf: Avoid unloading library while textservices are activated.
|
||
|
|
||
|
Based on a patch by Qian Hong.
|
||
|
---
|
||
|
dlls/msctf/msctf.c | 4 ++++
|
||
|
1 file changed, 4 insertions(+)
|
||
|
|
||
|
diff --git a/dlls/msctf/msctf.c b/dlls/msctf/msctf.c
|
||
|
index 231246a..1582ddd 100644
|
||
|
--- a/dlls/msctf/msctf.c
|
||
|
+++ b/dlls/msctf/msctf.c
|
||
|
@@ -445,6 +445,7 @@ HRESULT activate_textservices(ITfThreadMgr *tm)
|
||
|
if (activated > 1)
|
||
|
return S_OK;
|
||
|
|
||
|
+ InterlockedIncrement(&MSCTF_refCount);
|
||
|
LIST_FOR_EACH_ENTRY(ats, &AtsList, AtsEntry, entry)
|
||
|
{
|
||
|
hr = activate_given_ts(ats->ats, tm);
|
||
|
@@ -462,8 +463,11 @@ HRESULT deactivate_textservices(void)
|
||
|
activated --;
|
||
|
|
||
|
if (activated == 0)
|
||
|
+ {
|
||
|
LIST_FOR_EACH_ENTRY(ats, &AtsList, AtsEntry, entry)
|
||
|
deactivate_given_ts(ats->ats);
|
||
|
+ InterlockedDecrement(&MSCTF_refCount);
|
||
|
+ }
|
||
|
|
||
|
return S_OK;
|
||
|
}
|
||
|
--
|
||
|
2.3.0
|
||
|
|