Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
56d0b870
Commit
56d0b870
authored
May 09, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Introduce new NtUserNotifyIMEStatus syscall.
parent
e2674379
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
51 additions
and
58 deletions
+51
-58
driver.c
dlls/win32u/driver.c
+11
-0
imm.c
dlls/win32u/imm.c
+8
-0
syscall.c
dlls/win32u/syscall.c
+1
-0
win32u.spec
dlls/win32u/win32u.spec
+1
-1
ime.c
dlls/winex11.drv/ime.c
+2
-6
init.c
dlls/winex11.drv/init.c
+1
-0
unixlib.h
dlls/winex11.drv/unixlib.h
+0
-2
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-2
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+0
-18
xim.c
dlls/winex11.drv/xim.c
+13
-29
syscall.h
dlls/wow64win/syscall.h
+1
-0
user.c
dlls/wow64win/user.c
+9
-0
ntuser.h
include/ntuser.h
+1
-0
gdi_driver.h
include/wine/gdi_driver.h
+2
-0
No files found.
dlls/win32u/driver.c
View file @
56d0b870
...
...
@@ -716,6 +716,10 @@ static SHORT nulldrv_VkKeyScanEx( WCHAR ch, HKL layout )
return
-
256
;
/* use default implementation */
}
static
void
nulldrv_NotifyIMEStatus
(
HWND
hwnd
,
UINT
status
)
{
}
static
LRESULT
nulldrv_DesktopWindowProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
return
default_window_proc
(
hwnd
,
msg
,
wparam
,
lparam
,
FALSE
);
...
...
@@ -1070,6 +1074,11 @@ static SHORT loaderdrv_VkKeyScanEx( WCHAR ch, HKL layout )
return
load_driver
()
->
pVkKeyScanEx
(
ch
,
layout
);
}
static
void
loaderdrv_NotifyIMEStatus
(
HWND
hwnd
,
UINT
status
)
{
return
load_driver
()
->
pNotifyIMEStatus
(
hwnd
,
status
);
}
static
LONG
loaderdrv_ChangeDisplaySettings
(
LPDEVMODEW
displays
,
LPCWSTR
primary_name
,
HWND
hwnd
,
DWORD
flags
,
LPVOID
lparam
)
{
...
...
@@ -1176,6 +1185,7 @@ static const struct user_driver_funcs lazy_load_driver =
loaderdrv_ToUnicodeEx
,
loaderdrv_UnregisterHotKey
,
loaderdrv_VkKeyScanEx
,
loaderdrv_NotifyIMEStatus
,
/* cursor/icon functions */
nulldrv_DestroyCursorIcon
,
loaderdrv_SetCursor
,
...
...
@@ -1255,6 +1265,7 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version
SET_USER_FUNC
(
ToUnicodeEx
);
SET_USER_FUNC
(
UnregisterHotKey
);
SET_USER_FUNC
(
VkKeyScanEx
);
SET_USER_FUNC
(
NotifyIMEStatus
);
SET_USER_FUNC
(
DestroyCursorIcon
);
SET_USER_FUNC
(
SetCursor
);
SET_USER_FUNC
(
GetCursorPos
);
...
...
dlls/win32u/imm.c
View file @
56d0b870
...
...
@@ -421,6 +421,14 @@ NTSTATUS WINAPI NtUserBuildHimcList( UINT thread_id, UINT count, HIMC *buffer, U
return
STATUS_SUCCESS
;
}
/*****************************************************************************
* NtUserNotifyIMEStatus (win32u.@)
*/
void
WINAPI
NtUserNotifyIMEStatus
(
HWND
hwnd
,
UINT
status
)
{
user_driver
->
pNotifyIMEStatus
(
hwnd
,
status
);
}
BOOL
WINAPI
DECLSPEC_HIDDEN
ImmProcessKey
(
HWND
hwnd
,
HKL
hkl
,
UINT
vkey
,
LPARAM
key_data
,
DWORD
unknown
)
{
struct
imm_process_key_params
params
=
...
...
dlls/win32u/syscall.c
View file @
56d0b870
...
...
@@ -233,6 +233,7 @@ static void * const syscalls[] =
NtUserMessageCall
,
NtUserMoveWindow
,
NtUserMsgWaitForMultipleObjectsEx
,
NtUserNotifyIMEStatus
,
NtUserNotifyWinEvent
,
NtUserOpenClipboard
,
NtUserOpenDesktop
,
...
...
dlls/win32u/win32u.spec
View file @
56d0b870
...
...
@@ -1087,7 +1087,7 @@
@ stdcall -syscall NtUserMoveWindow(long long long long long long)
@ stdcall -syscall NtUserMsgWaitForMultipleObjectsEx(long ptr long long long)
@ stub NtUserNavigateFocus
@ st
ub NtUserNotifyIMEStatus
@ st
dcall -syscall NtUserNotifyIMEStatus(long long)
@ stub NtUserNotifyProcessCreate
@ stdcall -syscall NtUserNotifyWinEvent(long long long long)
@ stdcall -syscall NtUserOpenClipboard(long long)
...
...
dlls/winex11.drv/ime.c
View file @
56d0b870
...
...
@@ -531,7 +531,6 @@ UINT WINAPI ImeToAsciiEx (UINT uVKey, UINT uScanCode, const LPBYTE lpbKeyState,
BOOL
WINAPI
NotifyIME
(
HIMC
hIMC
,
DWORD
dwAction
,
DWORD
dwIndex
,
DWORD
dwValue
)
{
struct
xim_preedit_state_params
preedit_params
;
BOOL
bRet
=
FALSE
;
LPINPUTCONTEXT
lpIMC
;
...
...
@@ -572,16 +571,13 @@ BOOL WINAPI NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue)
}
break
;
case
IMC_SETOPENSTATUS
:
bRet
=
TRUE
;
preedit_params
.
hwnd
=
lpIMC
->
hWnd
;
preedit_params
.
open
=
lpIMC
->
fOpen
;
X11DRV_CALL
(
xim_preedit_state
,
&
preedit_params
);
if
(
!
lpIMC
->
fOpen
)
{
X11DRV_CALL
(
xim_reset
,
lpIMC
->
hWnd
);
input_context_reset_comp_str
(
lpIMC
);
ime_set_composition_status
(
hIMC
,
FALSE
);
}
NtUserNotifyIMEStatus
(
lpIMC
->
hWnd
,
lpIMC
->
fOpen
);
bRet
=
TRUE
;
break
;
default:
FIXME
(
"Unknown
\n
"
);
break
;
}
...
...
dlls/winex11.drv/init.c
View file @
56d0b870
...
...
@@ -398,6 +398,7 @@ static const struct user_driver_funcs x11drv_funcs =
.
pMapVirtualKeyEx
=
X11DRV_MapVirtualKeyEx
,
.
pToUnicodeEx
=
X11DRV_ToUnicodeEx
,
.
pVkKeyScanEx
=
X11DRV_VkKeyScanEx
,
.
pNotifyIMEStatus
=
X11DRV_NotifyIMEStatus
,
.
pDestroyCursorIcon
=
X11DRV_DestroyCursorIcon
,
.
pSetCursor
=
X11DRV_SetCursor
,
.
pGetCursorPos
=
X11DRV_GetCursorPos
,
...
...
dlls/winex11.drv/unixlib.h
View file @
56d0b870
...
...
@@ -31,8 +31,6 @@ enum x11drv_funcs
unix_tablet_get_packet
,
unix_tablet_info
,
unix_tablet_load_info
,
unix_xim_preedit_state
,
unix_xim_reset
,
unix_funcs_count
,
};
...
...
dlls/winex11.drv/x11drv.h
View file @
56d0b870
...
...
@@ -209,6 +209,7 @@ extern UINT X11DRV_MapVirtualKeyEx( UINT code, UINT map_type, HKL hkl ) DECLSPEC
extern
INT
X11DRV_ToUnicodeEx
(
UINT
virtKey
,
UINT
scanCode
,
const
BYTE
*
lpKeyState
,
LPWSTR
bufW
,
int
bufW_size
,
UINT
flags
,
HKL
hkl
)
DECLSPEC_HIDDEN
;
extern
SHORT
X11DRV_VkKeyScanEx
(
WCHAR
wChar
,
HKL
hkl
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_NotifyIMEStatus
(
HWND
hwnd
,
UINT
status
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_DestroyCursorIcon
(
HCURSOR
handle
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_SetCursor
(
HCURSOR
handle
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_SetCursorPos
(
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
...
...
@@ -848,8 +849,6 @@ extern NTSTATUS x11drv_tablet_attach_queue( void *arg ) DECLSPEC_HIDDEN;
extern
NTSTATUS
x11drv_tablet_get_packet
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
x11drv_tablet_load_info
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
x11drv_tablet_info
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
x11drv_xim_preedit_state
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
x11drv_xim_reset
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
x11drv_client_func
(
enum
x11drv_client_funcs
func
,
const
void
*
params
,
ULONG
size
)
DECLSPEC_HIDDEN
;
...
...
dlls/winex11.drv/x11drv_main.c
View file @
56d0b870
...
...
@@ -1330,8 +1330,6 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
x11drv_tablet_get_packet
,
x11drv_tablet_info
,
x11drv_tablet_load_info
,
x11drv_xim_preedit_state
,
x11drv_xim_reset
,
};
...
...
@@ -1408,20 +1406,6 @@ static NTSTATUS x11drv_wow64_tablet_info( void *arg )
return
x11drv_tablet_info
(
&
params
);
}
static
NTSTATUS
x11drv_wow64_xim_preedit_state
(
void
*
arg
)
{
struct
{
ULONG
hwnd
;
BOOL
open
;
}
*
params32
=
arg
;
struct
xim_preedit_state_params
params
;
params
.
hwnd
=
UlongToHandle
(
params32
->
hwnd
);
params
.
open
=
params32
->
open
;
return
x11drv_xim_preedit_state
(
&
params
);
}
const
unixlib_entry_t
__wine_unix_call_wow64_funcs
[]
=
{
x11drv_create_desktop
,
...
...
@@ -1434,8 +1418,6 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] =
x11drv_wow64_tablet_get_packet
,
x11drv_wow64_tablet_info
,
x11drv_tablet_load_info
,
x11drv_wow64_xim_preedit_state
,
x11drv_xim_reset
,
};
C_ASSERT
(
ARRAYSIZE
(
__wine_unix_call_wow64_funcs
)
==
unix_funcs_count
);
...
...
dlls/winex11.drv/xim.c
View file @
56d0b870
...
...
@@ -260,42 +260,26 @@ static int xic_status_draw( XIC xic, XPointer user, XPointer arg )
return
0
;
}
NTSTATUS
x11drv_xim_reset
(
void
*
hwnd
)
{
XIC
ic
=
X11DRV_get_ic
(
hwnd
);
if
(
ic
)
{
char
*
leftover
;
TRACE
(
"Forcing Reset %p
\n
"
,
ic
);
leftover
=
XmbResetIC
(
ic
);
XFree
(
leftover
);
}
return
0
;
}
NTSTATUS
x11drv_xim_preedit_state
(
void
*
arg
)
/***********************************************************************
* NotifyIMEStatus (X11DRV.@)
*/
void
X11DRV_NotifyIMEStatus
(
HWND
hwnd
,
UINT
status
)
{
struct
xim_preedit_state_params
*
params
=
arg
;
XIC
ic
;
XIMPreeditState
state
;
XIMPreeditState
state
=
status
?
XIMPreeditEnable
:
XIMPreeditDisable
;
XVaNestedList
attr
;
XIC
xic
;
ic
=
X11DRV_get_ic
(
params
->
hwnd
);
if
(
!
ic
)
return
0
;
TRACE
(
"hwnd %p, status %#x
\n
"
,
hwnd
,
status
);
if
(
params
->
open
)
state
=
XIMPreeditEnable
;
else
state
=
XIMPreeditDisable
;
if
(
!
(
xic
=
X11DRV_get_ic
(
hwnd
)))
return
;
attr
=
XVaCreateNestedList
(
0
,
XNPreeditState
,
state
,
NULL
);
if
(
attr
!=
NULL
)
if
((
attr
=
XVaCreateNestedList
(
0
,
XNPreeditState
,
state
,
NULL
)))
{
XSetICValues
(
ic
,
XNPreeditAttributes
,
attr
,
NULL
);
XFree
(
attr
);
XSetICValues
(
xic
,
XNPreeditAttributes
,
attr
,
NULL
);
XFree
(
attr
);
}
return
0
;
if
(
!
status
)
XFree
(
XmbResetIC
(
xic
)
);
}
/***********************************************************************
...
...
dlls/wow64win/syscall.h
View file @
56d0b870
...
...
@@ -219,6 +219,7 @@
SYSCALL_ENTRY( NtUserMessageCall ) \
SYSCALL_ENTRY( NtUserMoveWindow ) \
SYSCALL_ENTRY( NtUserMsgWaitForMultipleObjectsEx ) \
SYSCALL_ENTRY( NtUserNotifyIMEStatus ) \
SYSCALL_ENTRY( NtUserNotifyWinEvent ) \
SYSCALL_ENTRY( NtUserOpenClipboard ) \
SYSCALL_ENTRY( NtUserOpenDesktop ) \
...
...
dlls/wow64win/user.c
View file @
56d0b870
...
...
@@ -3154,6 +3154,15 @@ NTSTATUS WINAPI wow64_NtUserMsgWaitForMultipleObjectsEx( UINT *args )
return
NtUserMsgWaitForMultipleObjectsEx
(
count
,
handles
,
timeout
,
mask
,
flags
);
}
NTSTATUS
WINAPI
wow64_NtUserNotifyIMEStatus
(
UINT
*
args
)
{
HWND
hwnd
=
get_handle
(
&
args
);
ULONG
status
=
get_ulong
(
&
args
);
NtUserNotifyIMEStatus
(
hwnd
,
status
);
return
0
;
}
NTSTATUS
WINAPI
wow64_NtUserNotifyWinEvent
(
UINT
*
args
)
{
DWORD
event
=
get_ulong
(
&
args
);
...
...
include/ntuser.h
View file @
56d0b870
...
...
@@ -817,6 +817,7 @@ LRESULT WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpa
BOOL
WINAPI
NtUserMoveWindow
(
HWND
hwnd
,
INT
x
,
INT
y
,
INT
cx
,
INT
cy
,
BOOL
repaint
);
DWORD
WINAPI
NtUserMsgWaitForMultipleObjectsEx
(
DWORD
count
,
const
HANDLE
*
handles
,
DWORD
timeout
,
DWORD
mask
,
DWORD
flags
);
void
WINAPI
NtUserNotifyIMEStatus
(
HWND
hwnd
,
UINT
status
);
void
WINAPI
NtUserNotifyWinEvent
(
DWORD
event
,
HWND
hwnd
,
LONG
object_id
,
LONG
child_id
);
HWINSTA
WINAPI
NtUserOpenWindowStation
(
OBJECT_ATTRIBUTES
*
attr
,
ACCESS_MASK
access
);
BOOL
WINAPI
NtUserOpenClipboard
(
HWND
hwnd
,
ULONG
unk
);
...
...
include/wine/gdi_driver.h
View file @
56d0b870
...
...
@@ -287,6 +287,8 @@ struct user_driver_funcs
INT
(
*
pToUnicodeEx
)(
UINT
,
UINT
,
const
BYTE
*
,
LPWSTR
,
int
,
UINT
,
HKL
);
void
(
*
pUnregisterHotKey
)(
HWND
,
UINT
,
UINT
);
SHORT
(
*
pVkKeyScanEx
)(
WCHAR
,
HKL
);
/* IME functions */
void
(
*
pNotifyIMEStatus
)(
HWND
,
UINT
);
/* cursor/icon functions */
void
(
*
pDestroyCursorIcon
)(
HCURSOR
);
void
(
*
pSetCursor
)(
HCURSOR
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment