From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/driver.c | 20 ++++++++++++-------- dlls/winex11.drv/init.c | 2 +- dlls/winex11.drv/x11drv.h | 2 +- include/wine/gdi_driver.h | 5 ++--- 4 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c index 87b2971216d..c56bf89d069 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c @@ -686,6 +686,11 @@ static void nulldrv_NotifyIMEStatus( HWND hwnd, UINT status ) { }
+static BOOL nulldrv_SetIMECompositionWindowPos( HWND hwnd, const POINT *point ) +{ + return FALSE; +} + static LRESULT nulldrv_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) { return default_window_proc( hwnd, msg, wparam, lparam, FALSE ); @@ -914,11 +919,6 @@ static void nulldrv_ThreadDetach( void ) { }
-static BOOL nulldrv_SetIMECompositionWindowPos( HWND hwnd, const POINT *point ) -{ - return FALSE; -} - static const WCHAR guid_key_prefixW[] = { '\','R','e','g','i','s','t','r','y', @@ -1099,6 +1099,11 @@ static void loaderdrv_NotifyIMEStatus( HWND hwnd, UINT status ) return load_driver()->pNotifyIMEStatus( hwnd, status ); }
+static BOOL loaderdrv_SetIMECompositionWindowPos( HWND hwnd, const POINT *point ) +{ + return load_driver()->pSetIMECompositionWindowPos( hwnd, point ); +} + static LONG loaderdrv_ChangeDisplaySettings( LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd, DWORD flags, LPVOID lparam ) { @@ -1243,6 +1248,7 @@ static const struct user_driver_funcs lazy_load_driver = loaderdrv_ReleaseKbdTables, loaderdrv_ImeProcessKey, loaderdrv_NotifyIMEStatus, + loaderdrv_SetIMECompositionWindowPos, /* cursor/icon functions */ nulldrv_DestroyCursorIcon, loaderdrv_SetCursor, @@ -1299,8 +1305,6 @@ static const struct user_driver_funcs lazy_load_driver = nulldrv_wine_get_wgl_driver, /* thread management */ nulldrv_ThreadDetach, - /* IME support */ - nulldrv_SetIMECompositionWindowPos, };
const struct user_driver_funcs *user_driver = &lazy_load_driver; @@ -1338,6 +1342,7 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version SET_USER_FUNC(ReleaseKbdTables); SET_USER_FUNC(ImeProcessKey); SET_USER_FUNC(NotifyIMEStatus); + SET_USER_FUNC(SetIMECompositionWindowPos); SET_USER_FUNC(DestroyCursorIcon); SET_USER_FUNC(SetCursor); SET_USER_FUNC(GetCursorPos); @@ -1385,7 +1390,6 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version SET_USER_FUNC(VulkanInit); SET_USER_FUNC(wine_get_wgl_driver); SET_USER_FUNC(ThreadDetach); - SET_USER_FUNC(SetIMECompositionWindowPos); #undef SET_USER_FUNC
prev = InterlockedCompareExchangePointer( (void **)&user_driver, driver, (void *)&lazy_load_driver ); diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index 3b919335624..1fa07d38e13 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -385,6 +385,7 @@ static const struct user_driver_funcs x11drv_funcs = .pToUnicodeEx = X11DRV_ToUnicodeEx, .pVkKeyScanEx = X11DRV_VkKeyScanEx, .pNotifyIMEStatus = X11DRV_NotifyIMEStatus, + .pSetIMECompositionWindowPos = X11DRV_SetIMECompositionWindowPos, .pDestroyCursorIcon = X11DRV_DestroyCursorIcon, .pSetCursor = X11DRV_SetCursor, .pGetCursorPos = X11DRV_GetCursorPos, @@ -430,7 +431,6 @@ static const struct user_driver_funcs x11drv_funcs = .pVulkanInit = X11DRV_VulkanInit, .pwine_get_wgl_driver = X11DRV_wine_get_wgl_driver, .pThreadDetach = X11DRV_ThreadDetach, - .pSetIMECompositionWindowPos = X11DRV_SetIMECompositionWindowPos, };
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index 72527c7b92d..e75e3d7c70a 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -205,6 +205,7 @@ extern INT X11DRV_ToUnicodeEx( UINT virtKey, UINT scanCode, const BYTE *lpKeySta LPWSTR bufW, int bufW_size, UINT flags, HKL hkl ); extern SHORT X11DRV_VkKeyScanEx( WCHAR wChar, HKL hkl ); extern void X11DRV_NotifyIMEStatus( HWND hwnd, UINT status ); +extern BOOL X11DRV_SetIMECompositionWindowPos( HWND hwnd, const POINT *point ); extern void X11DRV_DestroyCursorIcon( HCURSOR handle ); extern void X11DRV_SetCursor( HWND hwnd, HCURSOR handle ); extern BOOL X11DRV_SetCursorPos( INT x, INT y ); @@ -250,7 +251,6 @@ extern void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flag extern BOOL X11DRV_SystemParametersInfo( UINT action, UINT int_param, void *ptr_param, UINT flags ); extern void X11DRV_ThreadDetach(void); -extern BOOL X11DRV_SetIMECompositionWindowPos( HWND hwnd, const POINT *point );
/* X11 driver internal functions */
diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 7fe492f4776..a2497a39d7b 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -219,7 +219,7 @@ struct gdi_dc_funcs };
/* increment this when you change the DC function table */ -#define WINE_GDI_DRIVER_VERSION 94 +#define WINE_GDI_DRIVER_VERSION 95
#define GDI_PRIORITY_NULL_DRV 0 /* null driver */ #define GDI_PRIORITY_FONT_DRV 100 /* any font driver */ @@ -340,6 +340,7 @@ struct user_driver_funcs /* IME functions */ UINT (*pImeProcessKey)(HIMC,UINT,UINT,const BYTE*); void (*pNotifyIMEStatus)(HWND,UINT); + BOOL (*pSetIMECompositionWindowPos)(HWND, const POINT *); /* cursor/icon functions */ void (*pDestroyCursorIcon)(HCURSOR); void (*pSetCursor)(HWND,HCURSOR); @@ -396,8 +397,6 @@ struct user_driver_funcs struct opengl_funcs * (*pwine_get_wgl_driver)(UINT); /* thread management */ void (*pThreadDetach)(void); - /* IME support */ - BOOL (*pSetIMECompositionWindowPos)(HWND, const POINT *); };
W32KAPI void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version );