winex11-CandidateWindowPos: Directly use win32u for user functions.

This commit is contained in:
Zebediah Figura 2022-04-26 18:02:07 -05:00
parent 9e823e7f3e
commit b54ac2f2b2

View File

@ -1,4 +1,4 @@
From 5ce1bdf660f28a3aecffdb442a071f574fdbea31 Mon Sep 17 00:00:00 2001
From 05c560e6de31f40125ff4955aabad2262ed4d342 Mon Sep 17 00:00:00 2001
From: Felix Yan <felixonmars@gmail.com>
Date: Tue, 23 Sep 2014 23:22:17 +0800
Subject: [PATCH] winex11.drv: Update a candidate window's position with
@ -102,7 +102,7 @@ index a8d2f78aa6b..12e55bbf1d2 100644
/* X11 driver internal functions */
diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c
index 6adf2475de7..7a574e41e27 100644
index 6adf2475de7..5b57c572e5f 100644
--- a/dlls/winex11.drv/xim.c
+++ b/dlls/winex11.drv/xim.c
@@ -30,6 +30,7 @@
@ -127,7 +127,7 @@ index 6adf2475de7..7a574e41e27 100644
+ struct x11drv_win_data *data;
+ HWND parent;
+
+ for (parent = hwnd; parent && parent != GetDesktopWindow(); parent = GetAncestor( parent, GA_PARENT ))
+ for (parent = hwnd; parent && parent != NtUserGetDesktopWindow(); parent = NtUserGetAncestor( parent, GA_PARENT ))
+ {
+ if (!(data = get_win_data( parent ))) continue;
+ if (data->xic)
@ -140,9 +140,9 @@ index 6adf2475de7..7a574e41e27 100644
+ pt.y = caret_rect->bottom;
+
+ if (hwnd != data->hwnd)
+ MapWindowPoints( hwnd, data->hwnd, &pt, 1 );
+ NtUserMapWindowPoints( hwnd, data->hwnd, &pt, 1 );
+
+ if (GetWindowLongW( data->hwnd, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL)
+ if (NtUserGetWindowLongW( data->hwnd, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL)
+ pt.x = data->client_rect.right - data->client_rect.left - 1 - pt.x;
+
+ xpoint.x = pt.x + data->client_rect.left - data->whole_rect.left;