From: Ziia Shi <mkrsym1@gmail.com> --- dlls/win32u/driver.c | 12 ++++++++++++ dlls/win32u/input.c | 5 +++++ dlls/win32u/sysparams.c | 3 +++ dlls/win32u/win32u_private.h | 1 + include/ntuser.h | 1 + include/wine/gdi_driver.h | 3 ++- 6 files changed, 24 insertions(+), 1 deletion(-) diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c index 60aba702d1a..42f4a11175d 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c @@ -685,6 +685,11 @@ static BOOL nulldrv_SetIMECompositionRect( HWND hwnd, RECT rect ) return FALSE; } +static BOOL nulldrv_SetIMEEnabled( HWND hwnd, BOOL enabled ) +{ + return FALSE; +} + static LRESULT nulldrv_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) { return default_window_proc( hwnd, msg, wparam, lparam, FALSE ); @@ -1113,6 +1118,11 @@ static BOOL loaderdrv_SetIMECompositionRect( HWND hwnd, RECT rect ) return load_driver()->pSetIMECompositionRect( hwnd, rect ); } +static BOOL loaderdrv_SetIMEEnabled( HWND hwnd, BOOL enabled ) +{ + return load_driver()->pSetIMEEnabled( hwnd, enabled ); +} + static LONG loaderdrv_ChangeDisplaySettings( LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd, DWORD flags, LPVOID lparam ) { @@ -1258,6 +1268,7 @@ static const struct user_driver_funcs lazy_load_driver = loaderdrv_ImeProcessKey, loaderdrv_NotifyIMEStatus, loaderdrv_SetIMECompositionRect, + loaderdrv_SetIMEEnabled, /* cursor/icon functions */ nulldrv_DestroyCursorIcon, loaderdrv_SetCursor, @@ -1362,6 +1373,7 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version SET_USER_FUNC(ImeProcessKey); SET_USER_FUNC(NotifyIMEStatus); SET_USER_FUNC(SetIMECompositionRect); + SET_USER_FUNC(SetIMEEnabled); SET_USER_FUNC(DestroyCursorIcon); SET_USER_FUNC(SetCursor); SET_USER_FUNC(GetCursorPos); diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index c86a357ab14..52110dfa886 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -2467,6 +2467,11 @@ BOOL set_ime_composition_rect( HWND hwnd, RECT rect ) return user_driver->pSetIMECompositionRect( NtUserGetAncestor( hwnd, GA_ROOT ), rect ); } +BOOL set_ime_enabled( HWND hwnd, BOOL enabled ) +{ + return user_driver->pSetIMEEnabled( NtUserGetAncestor( hwnd, GA_ROOT ), enabled ); +} + /***************************************************************** * NtUserSetCaretPos (win32u.@) */ diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 945b03c0b15..0a957802076 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -7607,6 +7607,9 @@ ULONG_PTR WINAPI NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code case NtUserCallTwoParam_SetIMECompositionRect: return set_ime_composition_rect( UlongToHandle(arg1), *(const RECT *)arg2 ); + case NtUserCallTwoParam_SetIMEEnabled: + return set_ime_enabled( UlongToHandle(arg1), arg2 ); + case NtUserCallTwoParam_AdjustWindowRect: { struct adjust_window_rect_params *params = (void *)arg2; diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 1024fb71c26..85c2592b575 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -103,6 +103,7 @@ extern BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret ); extern BOOL set_foreground_window( HWND hwnd, BOOL mouse, BOOL force ); extern BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus, DWORD new_active_thread_id ); extern BOOL set_ime_composition_rect( HWND hwnd, RECT rect ); +extern BOOL set_ime_enabled( HWND hwnd, BOOL enabled ); extern void toggle_caret( HWND hwnd ); extern void update_mouse_tracking_info( HWND hwnd ); extern void update_current_mouse_window( HWND hwnd, INT hittest, POINT pos ); diff --git a/include/ntuser.h b/include/ntuser.h index ce1b18fdfd9..84caec08efb 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -1217,6 +1217,7 @@ enum NtUserCallTwoParam_MonitorFromRect, NtUserCallTwoParam_SetIconParam, NtUserCallTwoParam_SetIMECompositionRect, + NtUserCallTwoParam_SetIMEEnabled, NtUserCallTwoParam_AdjustWindowRect, NtUserCallTwoParam_GetVirtualScreenRect, /* temporary exports */ diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index f6390bce878..07e8d160691 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -218,7 +218,7 @@ struct gdi_dc_funcs }; /* increment this when you change the DC function table */ -#define WINE_GDI_DRIVER_VERSION 108 +#define WINE_GDI_DRIVER_VERSION 109 #define GDI_PRIORITY_NULL_DRV 0 /* null driver */ #define GDI_PRIORITY_FONT_DRV 100 /* any font driver */ @@ -375,6 +375,7 @@ struct user_driver_funcs UINT (*pImeProcessKey)(HIMC,UINT,UINT,const BYTE*); void (*pNotifyIMEStatus)(HWND,UINT); BOOL (*pSetIMECompositionRect)(HWND,RECT); + BOOL (*pSetIMEEnabled)(HWND,BOOL); /* cursor/icon functions */ void (*pDestroyCursorIcon)(HCURSOR); void (*pSetCursor)(HWND,HCURSOR); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10007