winemac: Only register the IME class when needed.
This commit is contained in:
parent
e577e4b3e6
commit
5435dad997
|
@ -566,6 +566,7 @@ static void UpdateDataInDefaultIMEWindow(HIMC hIMC, HWND hwnd, BOOL showable)
|
||||||
BOOL WINAPI ImeInquire(LPIMEINFO lpIMEInfo, LPWSTR lpszUIClass, LPCWSTR lpszOption)
|
BOOL WINAPI ImeInquire(LPIMEINFO lpIMEInfo, LPWSTR lpszUIClass, LPCWSTR lpszOption)
|
||||||
{
|
{
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
|
IME_RegisterClasses( macdrv_module );
|
||||||
lpIMEInfo->dwPrivateDataSize = sizeof(IMEPRIVATE);
|
lpIMEInfo->dwPrivateDataSize = sizeof(IMEPRIVATE);
|
||||||
lpIMEInfo->fdwProperty = IME_PROP_UNICODE | IME_PROP_AT_CARET;
|
lpIMEInfo->fdwProperty = IME_PROP_UNICODE | IME_PROP_AT_CARET;
|
||||||
lpIMEInfo->fdwConversionCaps = IME_CMODE_NATIVE;
|
lpIMEInfo->fdwConversionCaps = IME_CMODE_NATIVE;
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
extern BOOL skip_single_buffer_flushes DECLSPEC_HIDDEN;
|
extern BOOL skip_single_buffer_flushes DECLSPEC_HIDDEN;
|
||||||
extern BOOL allow_vsync DECLSPEC_HIDDEN;
|
extern BOOL allow_vsync DECLSPEC_HIDDEN;
|
||||||
extern BOOL allow_set_gamma DECLSPEC_HIDDEN;
|
extern BOOL allow_set_gamma DECLSPEC_HIDDEN;
|
||||||
|
extern HMODULE macdrv_module DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
|
|
||||||
extern const char* debugstr_cf(CFTypeRef t) DECLSPEC_HIDDEN;
|
extern const char* debugstr_cf(CFTypeRef t) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -52,6 +52,7 @@ BOOL allow_vsync = TRUE;
|
||||||
BOOL allow_set_gamma = TRUE;
|
BOOL allow_set_gamma = TRUE;
|
||||||
int left_option_is_alt = 0;
|
int left_option_is_alt = 0;
|
||||||
int right_option_is_alt = 0;
|
int right_option_is_alt = 0;
|
||||||
|
HMODULE macdrv_module = 0;
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
@ -183,7 +184,7 @@ static void setup_options(void)
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* process_attach
|
* process_attach
|
||||||
*/
|
*/
|
||||||
static BOOL process_attach( HINSTANCE instance )
|
static BOOL process_attach(void)
|
||||||
{
|
{
|
||||||
SessionAttributeBits attributes;
|
SessionAttributeBits attributes;
|
||||||
OSStatus status;
|
OSStatus status;
|
||||||
|
@ -205,7 +206,6 @@ static BOOL process_attach( HINSTANCE instance )
|
||||||
|
|
||||||
set_app_icon();
|
set_app_icon();
|
||||||
macdrv_clipboard_process_attach();
|
macdrv_clipboard_process_attach();
|
||||||
IME_RegisterClasses( instance );
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -301,7 +301,8 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
|
||||||
switch(reason)
|
switch(reason)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
ret = process_attach( hinst );
|
macdrv_module = hinst;
|
||||||
|
ret = process_attach();
|
||||||
break;
|
break;
|
||||||
case DLL_THREAD_DETACH:
|
case DLL_THREAD_DETACH:
|
||||||
thread_detach();
|
thread_detach();
|
||||||
|
|
Loading…
Reference in New Issue