Commit 4e92c572 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winex11: Send an internal WM_IME_NOTIFY wparam to set open status.

parent 5d0526d2
...@@ -40,6 +40,7 @@ static const char *debugstr_imn( WPARAM wparam ) ...@@ -40,6 +40,7 @@ static const char *debugstr_imn( WPARAM wparam )
case IMN_SETCOMPOSITIONWINDOW: return "IMN_SETCOMPOSITIONWINDOW"; case IMN_SETCOMPOSITIONWINDOW: return "IMN_SETCOMPOSITIONWINDOW";
case IMN_GUIDELINE: return "IMN_GUIDELINE"; case IMN_GUIDELINE: return "IMN_GUIDELINE";
case IMN_SETSTATUSWINDOWPOS: return "IMN_SETSTATUSWINDOWPOS"; case IMN_SETSTATUSWINDOWPOS: return "IMN_SETSTATUSWINDOWPOS";
case IMN_WINE_SET_OPEN_STATUS: return "IMN_WINE_SET_OPEN_STATUS";
default: return wine_dbg_sprintf( "%#Ix", wparam ); default: return wine_dbg_sprintf( "%#Ix", wparam );
} }
} }
...@@ -337,6 +338,20 @@ static void ime_ui_start_composition( HIMC himc, HWND hwnd ) ...@@ -337,6 +338,20 @@ static void ime_ui_start_composition( HIMC himc, HWND hwnd )
ImmUnlockIMC( himc ); ImmUnlockIMC( himc );
} }
static LRESULT ime_ui_notify( HIMC himc, HWND hwnd, WPARAM wparam, LPARAM lparam )
{
TRACE( "himc %p, hwnd %p, wparam %s, lparam %#Ix\n", hwnd, himc, debugstr_imn(wparam), lparam );
switch (wparam)
{
case IMN_WINE_SET_OPEN_STATUS:
return ImmSetOpenStatus( himc, lparam );
default:
FIXME( "himc %p, hwnd %p, wparam %s, lparam %#Ix stub!\n", hwnd, himc, debugstr_imn(wparam), lparam );
return 0;
}
}
static LRESULT WINAPI ime_ui_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) static LRESULT WINAPI ime_ui_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{ {
HIMC himc = (HIMC)GetWindowLongPtrW( hwnd, IMMGWL_IMC ); HIMC himc = (HIMC)GetWindowLongPtrW( hwnd, IMMGWL_IMC );
...@@ -379,9 +394,7 @@ static LRESULT WINAPI ime_ui_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LP ...@@ -379,9 +394,7 @@ static LRESULT WINAPI ime_ui_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LP
ShowWindow( hwnd, SW_HIDE ); ShowWindow( hwnd, SW_HIDE );
break; break;
case WM_IME_NOTIFY: case WM_IME_NOTIFY:
FIXME( "hwnd %p, himc %p, msg %s, wparam %s, lparam %#Ix stub!\n", hwnd, himc, return ime_ui_notify( himc, hwnd, wparam, lparam );
debugstr_wm_ime(msg), debugstr_imn(wparam), lparam );
return 0;
case WM_IME_CONTROL: case WM_IME_CONTROL:
FIXME( "hwnd %p, himc %p, msg %s, wparam %s, lparam %#Ix stub!\n", hwnd, himc, FIXME( "hwnd %p, himc %p, msg %s, wparam %s, lparam %#Ix stub!\n", hwnd, himc,
debugstr_wm_ime(msg), debugstr_imc(wparam), lparam ); debugstr_wm_ime(msg), debugstr_imc(wparam), lparam );
......
...@@ -32,7 +32,6 @@ static const callback_func callback_funcs[] = ...@@ -32,7 +32,6 @@ static const callback_func callback_funcs[] =
x11drv_dnd_leave_event, x11drv_dnd_leave_event,
x11drv_ime_set_composition_status, x11drv_ime_set_composition_status,
x11drv_ime_set_cursor_pos, x11drv_ime_set_cursor_pos,
x11drv_ime_set_open_status,
x11drv_ime_update_association, x11drv_ime_update_association,
}; };
......
...@@ -516,15 +516,6 @@ BOOL WINAPI ImeSelect(HIMC hIMC, BOOL fSelect) ...@@ -516,15 +516,6 @@ BOOL WINAPI ImeSelect(HIMC hIMC, BOOL fSelect)
/* Interfaces to XIM and other parts of winex11drv */ /* Interfaces to XIM and other parts of winex11drv */
NTSTATUS x11drv_ime_set_open_status( UINT open )
{
HIMC imc;
imc = RealIMC(FROM_X11);
ImmSetOpenStatus(imc, open);
return 0;
}
NTSTATUS x11drv_ime_set_composition_status( UINT open ) NTSTATUS x11drv_ime_set_composition_status( UINT open )
{ {
HIMC imc; HIMC imc;
......
...@@ -96,7 +96,6 @@ enum client_callback ...@@ -96,7 +96,6 @@ enum client_callback
client_dnd_leave_event, client_dnd_leave_event,
client_ime_set_composition_status, client_ime_set_composition_status,
client_ime_set_cursor_pos, client_ime_set_cursor_pos,
client_ime_set_open_status,
client_ime_update_association, client_ime_update_association,
client_funcs_count client_funcs_count
}; };
......
...@@ -38,7 +38,6 @@ extern NTSTATUS x11drv_dnd_drop_event( UINT arg ) DECLSPEC_HIDDEN; ...@@ -38,7 +38,6 @@ extern NTSTATUS x11drv_dnd_drop_event( UINT arg ) DECLSPEC_HIDDEN;
extern NTSTATUS x11drv_dnd_leave_event( UINT arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_dnd_leave_event( UINT arg ) DECLSPEC_HIDDEN;
extern NTSTATUS x11drv_ime_set_composition_status( UINT arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_ime_set_composition_status( UINT arg ) DECLSPEC_HIDDEN;
extern NTSTATUS x11drv_ime_set_cursor_pos( UINT pos ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_ime_set_cursor_pos( UINT pos ) DECLSPEC_HIDDEN;
extern NTSTATUS x11drv_ime_set_open_status( UINT open ) DECLSPEC_HIDDEN;
extern NTSTATUS x11drv_ime_update_association( UINT arg ) DECLSPEC_HIDDEN; extern NTSTATUS x11drv_ime_update_association( UINT arg ) DECLSPEC_HIDDEN;
extern LRESULT WINAPI foreign_window_proc( HWND hwnd, UINT msg, WPARAM wparam, extern LRESULT WINAPI foreign_window_proc( HWND hwnd, UINT msg, WPARAM wparam,
......
...@@ -122,12 +122,10 @@ static BOOL xic_preedit_state_notify( XIC xic, XPointer user, XPointer arg ) ...@@ -122,12 +122,10 @@ static BOOL xic_preedit_state_notify( XIC xic, XPointer user, XPointer arg )
switch (state) switch (state)
{ {
case XIMPreeditEnable: case XIMPreeditEnable:
x11drv_client_call( client_ime_set_open_status, TRUE ); send_message( hwnd, WM_IME_NOTIFY, IMN_WINE_SET_OPEN_STATUS, TRUE );
break; break;
case XIMPreeditDisable: case XIMPreeditDisable:
x11drv_client_call( client_ime_set_open_status, FALSE ); send_message( hwnd, WM_IME_NOTIFY, IMN_WINE_SET_OPEN_STATUS, FALSE );
break;
default:
break; break;
} }
......
...@@ -492,6 +492,9 @@ enum wine_internal_message ...@@ -492,6 +492,9 @@ enum wine_internal_message
#define IME_INTERNAL_HKL_ACTIVATE 0x19 #define IME_INTERNAL_HKL_ACTIVATE 0x19
#define IME_INTERNAL_HKL_DEACTIVATE 0x20 #define IME_INTERNAL_HKL_DEACTIVATE 0x20
/* internal WM_IME_NOTIFY wparams, not compatible with Windows */
#define IMN_WINE_SET_OPEN_STATUS 0x000f
/* builtin IME driver calls */ /* builtin IME driver calls */
enum wine_ime_call enum wine_ime_call
{ {
......
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