Commit 5435dad9 authored by Alexandre Julliard's avatar Alexandre Julliard

winemac: Only register the IME class when needed.

parent e577e4b3
......@@ -566,6 +566,7 @@ static void UpdateDataInDefaultIMEWindow(HIMC hIMC, HWND hwnd, BOOL showable)
BOOL WINAPI ImeInquire(LPIMEINFO lpIMEInfo, LPWSTR lpszUIClass, LPCWSTR lpszOption)
{
TRACE("\n");
IME_RegisterClasses( macdrv_module );
lpIMEInfo->dwPrivateDataSize = sizeof(IMEPRIVATE);
lpIMEInfo->fdwProperty = IME_PROP_UNICODE | IME_PROP_AT_CARET;
lpIMEInfo->fdwConversionCaps = IME_CMODE_NATIVE;
......
......@@ -38,6 +38,7 @@
extern BOOL skip_single_buffer_flushes DECLSPEC_HIDDEN;
extern BOOL allow_vsync DECLSPEC_HIDDEN;
extern BOOL allow_set_gamma DECLSPEC_HIDDEN;
extern HMODULE macdrv_module DECLSPEC_HIDDEN;
extern const char* debugstr_cf(CFTypeRef t) DECLSPEC_HIDDEN;
......
......@@ -52,6 +52,7 @@ BOOL allow_vsync = TRUE;
BOOL allow_set_gamma = TRUE;
int left_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
*/
static BOOL process_attach( HINSTANCE instance )
static BOOL process_attach(void)
{
SessionAttributeBits attributes;
OSStatus status;
......@@ -205,7 +206,6 @@ static BOOL process_attach( HINSTANCE instance )
set_app_icon();
macdrv_clipboard_process_attach();
IME_RegisterClasses( instance );
return TRUE;
}
......@@ -301,7 +301,8 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved)
switch(reason)
{
case DLL_PROCESS_ATTACH:
ret = process_attach( hinst );
macdrv_module = hinst;
ret = process_attach();
break;
case DLL_THREAD_DETACH:
thread_detach();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment