Rebase against 5b4009e8c27c16bdb9a5638c316a72aaee219158.

This commit is contained in:
Alistair Leslie-Hughes
2022-04-08 09:08:08 +10:00
parent 8647380744
commit f0719cee76
6 changed files with 74 additions and 169 deletions

View File

@ -1,4 +1,4 @@
From 72a7f7ad3dffa132367cec29b1aa20fcaca6d316 Mon Sep 17 00:00:00 2001
From 25d01cd37109d7d28d001563b6baca6fe8d9042f 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,16 +18,14 @@ This patch was based on the original work by Muneyuki Noguchi, and
received a lot of help from Sebastian Lackner.
---
dlls/user32/caret.c | 3 ++
dlls/user32/driver.c | 7 ++++
dlls/win32u/driver.c | 8 +++++
dlls/win32u/driver.c | 7 ++++
dlls/winex11.drv/init.c | 1 +
dlls/winex11.drv/x11drv.h | 1 +
dlls/winex11.drv/xim.c | 72 ++++++++++++++++++++++++++++++++++++++-
include/wine/gdi_driver.h | 6 ++++
7 files changed, 97 insertions(+), 1 deletion(-)
include/wine/gdi_driver.h | 2 ++
5 files changed, 84 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/caret.c b/dlls/user32/caret.c
index 8bf4962b708..33954123efe 100644
index 8bf4962b708..52ebcb8baa9 100644
--- a/dlls/user32/caret.c
+++ b/dlls/user32/caret.c
@@ -27,6 +27,7 @@
@ -54,56 +52,23 @@ index 8bf4962b708..33954123efe 100644
NtUserSetSystemTimer( hwnd, TIMERID, Caret.timeout, CARET_Callback );
}
return ret;
diff --git a/dlls/user32/driver.c b/dlls/user32/driver.c
index fbbf630a80e..7ce98f4a0f9 100644
--- a/dlls/user32/driver.c
+++ b/dlls/user32/driver.c
@@ -113,6 +113,11 @@ static void CDECL loaderdrv_UpdateClipboard(void)
load_driver()->pUpdateClipboard();
}
+static void CDECL loaderdrv_UpdateCandidatePos( HWND hwnd, const RECT *caret_rect )
+{
+ load_driver()->pUpdateCandidatePos( hwnd, caret_rect );
+}
+
static struct user_driver_funcs lazy_load_driver =
{
{ NULL },
@@ -167,6 +172,8 @@ static struct user_driver_funcs lazy_load_driver =
NULL,
/* opengl support */
NULL,
+ /* candidate pos functions */
+ loaderdrv_UpdateCandidatePos,
/* thread management */
NULL,
};
diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c
index d1062cb5f3a..50fc011e19f 100644
index 6b6f1a64ce8..a073d05be27 100644
--- a/dlls/win32u/driver.c
+++ b/dlls/win32u/driver.c
@@ -914,6 +914,7 @@ static BOOL CDECL nulldrv_SystemParametersInfo( UINT action, UINT int_param, voi
return FALSE;
}
+
static const struct vulkan_funcs * CDECL nulldrv_wine_get_vulkan_driver( UINT version )
{
return NULL;
@@ -924,6 +925,11 @@ static struct opengl_funcs * CDECL nulldrv_wine_get_wgl_driver( UINT version )
@@ -924,6 +924,11 @@ static struct opengl_funcs *nulldrv_wine_get_wgl_driver( UINT version )
return (void *)-1;
}
+static void CDECL nulldrv_UpdateCandidatePos( HWND hwnd, const RECT *caret_rect )
+static void nulldrv_UpdateCandidatePos( HWND hwnd, const RECT *caret_rect )
+{
+
+}
+
static void CDECL nulldrv_ThreadDetach( void )
static void nulldrv_ThreadDetach( void )
{
}
@@ -1223,6 +1229,7 @@ static const struct user_driver_funcs lazy_load_driver =
@@ -1218,6 +1223,7 @@ static const struct user_driver_funcs lazy_load_driver =
loaderdrv_wine_get_vulkan_driver,
/* opengl support */
nulldrv_wine_get_wgl_driver,
@ -111,7 +76,7 @@ index d1062cb5f3a..50fc011e19f 100644
/* thread management */
nulldrv_ThreadDetach,
};
@@ -1287,6 +1294,7 @@ void CDECL __wine_set_display_driver( struct user_driver_funcs *driver, UINT ver
@@ -1287,6 +1293,7 @@ void CDECL __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT v
SET_USER_FUNC(SystemParametersInfo);
SET_USER_FUNC(wine_get_vulkan_driver);
SET_USER_FUNC(wine_get_wgl_driver);
@ -120,7 +85,7 @@ index d1062cb5f3a..50fc011e19f 100644
#undef SET_USER_FUNC
diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c
index 9f2be685dec..4fb100e684b 100644
index e5162928c07..beea28bc491 100644
--- a/dlls/winex11.drv/init.c
+++ b/dlls/winex11.drv/init.c
@@ -415,6 +415,7 @@ static const struct user_driver_funcs x11drv_funcs =
@ -131,20 +96,8 @@ index 9f2be685dec..4fb100e684b 100644
.pThreadDetach = X11DRV_ThreadDetach,
};
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index ce9a254fb5b..9b6d83ae4f3 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -242,6 +242,7 @@ extern void CDECL X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT sw
struct window_surface *surface ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_SystemParametersInfo( UINT action, UINT int_param, void *ptr_param,
UINT flags ) DECLSPEC_HIDDEN;
+extern void CDECL X11DRV_UpdateCandidatePos( HWND hwnd, const RECT *caret_rect ) DECLSPEC_HIDDEN;
extern void CDECL X11DRV_ThreadDetach(void) DECLSPEC_HIDDEN;
/* X11 driver internal functions */
diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c
index 3994c2106cc..ec943dcd623 100644
index 3994c2106cc..55132bc983e 100644
--- a/dlls/winex11.drv/xim.c
+++ b/dlls/winex11.drv/xim.c
@@ -30,6 +30,7 @@
@ -162,7 +115,7 @@ index 3994c2106cc..ec943dcd623 100644
+/***********************************************************************
+ * X11DRV_UpdateCandidatePos
+ */
+void CDECL X11DRV_UpdateCandidatePos( HWND hwnd, const RECT *caret_rect )
+void X11DRV_UpdateCandidatePos( HWND hwnd, const RECT *caret_rect )
+{
+ if (ximStyle & XIMPreeditPosition)
+ {
@ -247,25 +200,17 @@ index 3994c2106cc..ec943dcd623 100644
return xic;
}
diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h
index b3c77a1d2c1..23bd1e9d8cf 100644
index a63e2c3ceda..79e9f869b6e 100644
--- a/include/wine/gdi_driver.h
+++ b/include/wine/gdi_driver.h
@@ -318,10 +318,16 @@ struct user_driver_funcs
const RECT *,struct window_surface*);
/* system parameters */
BOOL (CDECL *pSystemParametersInfo)(UINT,UINT,void*,UINT);
+
/* vulkan support */
const struct vulkan_funcs * (CDECL *pwine_get_vulkan_driver)(UINT);
+
@@ -324,6 +324,8 @@ struct user_driver_funcs
const struct vulkan_funcs * (*pwine_get_vulkan_driver)(UINT);
/* opengl support */
struct opengl_funcs * (CDECL *pwine_get_wgl_driver)(UINT);
+
struct opengl_funcs * (*pwine_get_wgl_driver)(UINT);
+ /* IME functions */
+ void (CDECL *pUpdateCandidatePos)(HWND, const RECT *);
+
+ void (*pUpdateCandidatePos)(HWND, const RECT *);
/* thread management */
void (CDECL *pThreadDetach)(void);
void (*pThreadDetach)(void);
};
--
2.35.1

View File

@ -1 +1,2 @@
Fixes: [30938] Update a XIM candidate position when cursor location changes
Disabled: True