From: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/win32u/input.c | 12 +++--------- dlls/winex11.drv/xim.c | 10 ++-------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c index a5f5ffdb6ef..0640b34ac2e 100644 --- a/dlls/win32u/input.c +++ b/dlls/win32u/input.c @@ -2355,15 +2355,9 @@ BOOL WINAPI NtUserGetCaretPos( POINT *pt ) BOOL set_ime_composition_rect( HWND hwnd, RECT rect ) { - HWND root_hwnd; - - if (!NtUserIsWindow( hwnd )) - return FALSE; - - root_hwnd = NtUserGetAncestor( hwnd, GA_ROOT ); - NtUserMapWindowPoints( hwnd, root_hwnd, (POINT *)&rect, 2, 0 /* per-monitor DPI */ ); - - return user_driver->pSetIMECompositionRect( root_hwnd, rect ); + if (!NtUserIsWindow( hwnd )) return FALSE; + NtUserMapWindowPoints( hwnd, 0, (POINT *)&rect, 2, 0 /* per-monitor DPI */ ); + return user_driver->pSetIMECompositionRect( NtUserGetAncestor( hwnd, GA_ROOT ), rect ); } /******************************************************************* diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c index 46b50480c93..acbe1c3aac1 100644 --- a/dlls/winex11.drv/xim.c +++ b/dlls/winex11.drv/xim.c @@ -507,14 +507,8 @@ BOOL X11DRV_SetIMECompositionRect( HWND hwnd, RECT rect ) return FALSE; } - if (NtUserGetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL) - { - rect.left = data->rects.client.right - data->rects.client.left - 1 - rect.left; - rect.right = data->rects.client.right - data->rects.client.left - 1 - rect.right; - } - - xpoint.x = rect.left + data->rects.client.left - data->rects.visible.left; - xpoint.y = rect.top + data->rects.client.top - data->rects.visible.top; + xpoint.x = rect.left - data->rects.visible.left; + xpoint.y = rect.top - data->rects.visible.top; attr = XVaCreateNestedList( 0, XNSpotLocation, &xpoint, NULL ); if (attr) { -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6647