imm32: Only unregister the IME class if it was registered.
This commit is contained in:
parent
aea09ade58
commit
4ef65b1e26
|
@ -60,6 +60,7 @@ static InputContextData *root_context = NULL;
|
||||||
static HWND hwndDefault = NULL;
|
static HWND hwndDefault = NULL;
|
||||||
static HANDLE hImeInst;
|
static HANDLE hImeInst;
|
||||||
static const WCHAR WC_IMECLASSNAME[] = {'I','M','E',0};
|
static const WCHAR WC_IMECLASSNAME[] = {'I','M','E',0};
|
||||||
|
static ATOM atIMEClass = 0;
|
||||||
|
|
||||||
/* MSIME messages */
|
/* MSIME messages */
|
||||||
static UINT WM_MSIME_SERVICE;
|
static UINT WM_MSIME_SERVICE;
|
||||||
|
@ -109,12 +110,14 @@ static void IMM_Register(void)
|
||||||
wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW +1);
|
wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW +1);
|
||||||
wndClass.lpszMenuName = 0;
|
wndClass.lpszMenuName = 0;
|
||||||
wndClass.lpszClassName = WC_IMECLASSNAME;
|
wndClass.lpszClassName = WC_IMECLASSNAME;
|
||||||
RegisterClassW(&wndClass);
|
atIMEClass = RegisterClassW(&wndClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void IMM_Unregister(void)
|
static void IMM_Unregister(void)
|
||||||
{
|
{
|
||||||
UnregisterClassW(WC_IMECLASSNAME, NULL);
|
if (atIMEClass) {
|
||||||
|
UnregisterClassW(WC_IMECLASSNAME, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void IMM_RegisterMessages(void)
|
static void IMM_RegisterMessages(void)
|
||||||
|
|
Loading…
Reference in New Issue