Updated winex11-CandidateWindowPos patchset

This commit is contained in:
Alistair Leslie-Hughes 2023-08-09 18:48:52 +10:00
parent 965789d221
commit 13a418812a

View File

@ -1,4 +1,4 @@
From f4c7ba985b14b3e8779beea13256f8759519a67b Mon Sep 17 00:00:00 2001
From 7149a4637b34e291dd5a9003b6f4a421d6c1781b 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
@ -18,18 +18,18 @@ This patch was based on the original work by Muneyuki Noguchi, and
received a lot of help from Sebastian Lackner.
---
dlls/win32u/driver.c | 7 ++++
dlls/win32u/input.c | 2 ++
dlls/win32u/input.c | 4 +++
dlls/winex11.drv/init.c | 1 +
dlls/winex11.drv/x11drv.h | 1 +
dlls/winex11.drv/xim.c | 70 +++++++++++++++++++++++++++++++++++++++
include/wine/gdi_driver.h | 2 ++
6 files changed, 83 insertions(+)
6 files changed, 85 insertions(+)
diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c
index d80b95499fa..0946e8470bb 100644
index ed2e0973d39..2965f5f0090 100644
--- a/dlls/win32u/driver.c
+++ b/dlls/win32u/driver.c
@@ -924,6 +924,11 @@ static struct opengl_funcs *nulldrv_wine_get_wgl_driver( UINT version )
@@ -923,6 +923,11 @@ static struct opengl_funcs *nulldrv_wine_get_wgl_driver( UINT version )
return (void *)-1;
}
@ -41,7 +41,7 @@ index d80b95499fa..0946e8470bb 100644
static void nulldrv_ThreadDetach( void )
{
}
@@ -1257,6 +1262,7 @@ static const struct user_driver_funcs lazy_load_driver =
@@ -1261,6 +1266,7 @@ static const struct user_driver_funcs lazy_load_driver =
loaderdrv_wine_get_vulkan_driver,
/* opengl support */
nulldrv_wine_get_wgl_driver,
@ -49,7 +49,7 @@ index d80b95499fa..0946e8470bb 100644
/* thread management */
nulldrv_ThreadDetach,
};
@@ -1333,6 +1339,7 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version
@@ -1337,6 +1343,7 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version
SET_USER_FUNC(SystemParametersInfo);
SET_USER_FUNC(wine_get_vulkan_driver);
SET_USER_FUNC(wine_get_wgl_driver);
@ -58,30 +58,32 @@ index d80b95499fa..0946e8470bb 100644
#undef SET_USER_FUNC
diff --git a/dlls/win32u/input.c b/dlls/win32u/input.c
index a900f6f553c..d1b74538ade 100644
index 1f9e48423fc..9eba12c37bd 100644
--- a/dlls/win32u/input.c
+++ b/dlls/win32u/input.c
@@ -2320,6 +2320,7 @@ BOOL set_caret_pos( int x, int y )
@@ -2330,6 +2330,8 @@ BOOL set_caret_pos( int x, int y )
r.left = x;
r.top = y;
display_caret( hwnd, &r );
+ user_driver->pUpdateCandidatePos( hwnd, &r );
+ if (user_driver->pUpdateCandidatePos)
+ user_driver->pUpdateCandidatePos( hwnd, &r );
NtUserSetSystemTimer( hwnd, SYSTEM_TIMER_CARET, caret.timeout );
}
return ret;
@@ -2357,6 +2358,7 @@ BOOL WINAPI NtUserShowCaret( HWND hwnd )
@@ -2367,6 +2369,8 @@ BOOL WINAPI NtUserShowCaret( HWND hwnd )
if (ret && hidden == 1) /* hidden was 1 so it's now 0 */
{
display_caret( hwnd, &r );
+ user_driver->pUpdateCandidatePos( hwnd, &r );
+ if (user_driver->pUpdateCandidatePos)
+ user_driver->pUpdateCandidatePos( hwnd, &r );
NtUserSetSystemTimer( hwnd, SYSTEM_TIMER_CARET, caret.timeout );
}
return ret;
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c
index 14035b338dc..8ba0de64ec8 100644
index c3d54da1d4d..8e277ba0003 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -441,6 +441,7 @@ static const struct user_driver_funcs x11drv_funcs =
@@ -437,6 +437,7 @@ static const struct user_driver_funcs x11drv_funcs =
.pSystemParametersInfo = X11DRV_SystemParametersInfo,
.pwine_get_vulkan_driver = X11DRV_wine_get_vulkan_driver,
.pwine_get_wgl_driver = X11DRV_wine_get_wgl_driver,
@ -90,7 +92,7 @@ index 14035b338dc..8ba0de64ec8 100644
};
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 049737003f0..3e5a630f01e 100644
index 9ee6498a02e..ef88221202f 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -256,6 +256,7 @@ extern void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flag
@ -102,7 +104,7 @@ index 049737003f0..3e5a630f01e 100644
/* X11 driver internal functions */
diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c
index 1c3d2dd9875..5c336522b9b 100644
index 209d63f0402..32e5fef58db 100644
--- a/dlls/winex11.drv/xim.c
+++ b/dlls/winex11.drv/xim.c
@@ -36,6 +36,7 @@
@ -113,7 +115,7 @@ index 1c3d2dd9875..5c336522b9b 100644
WINE_DEFAULT_DEBUG_CHANNEL(xim);
@@ -436,6 +437,49 @@ void xim_thread_attach( struct x11drv_thread_data *data )
@@ -438,6 +439,49 @@ void xim_thread_attach( struct x11drv_thread_data *data )
XRegisterIMInstantiateCallback( display, NULL, NULL, NULL, xim_open, (XPointer)data );
}
@ -163,7 +165,7 @@ index 1c3d2dd9875..5c336522b9b 100644
static BOOL xic_destroy( XIC xic, XPointer user, XPointer arg )
{
struct x11drv_win_data *data;
@@ -489,6 +533,32 @@ static XIC xic_create( XIM xim, HWND hwnd, Window win )
@@ -491,6 +535,32 @@ static XIC xic_create( XIM xim, HWND hwnd, Window win )
XFree( preedit );
XFree( status );
@ -197,10 +199,10 @@ index 1c3d2dd9875..5c336522b9b 100644
}
diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h
index 30b792a0232..4a27fb1e823 100644
index c4e859f21e5..fba67f9873e 100644
--- a/include/wine/gdi_driver.h
+++ b/include/wine/gdi_driver.h
@@ -339,6 +339,8 @@ struct user_driver_funcs
@@ -343,6 +343,8 @@ struct user_driver_funcs
const struct vulkan_funcs * (*pwine_get_vulkan_driver)(UINT);
/* opengl support */
struct opengl_funcs * (*pwine_get_wgl_driver)(UINT);