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
109d15ab
Commit
109d15ab
authored
Aug 17, 2023
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Sep 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Map WM_CHAR wparam in ASCII to Unicode in IsDialogMessageA() for CJK locales.
Fix displaying Chinese characters as "??" in some applications with Chinese locale.
parent
fe594a83
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
message.c
dlls/user32/message.c
+5
-1
dialog.c
dlls/user32/tests/dialog.c
+0
-4
ntuser.h
include/ntuser.h
+1
-0
No files found.
dlls/user32/message.c
View file @
109d15ab
...
...
@@ -814,8 +814,12 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetMessageA( MSG *msg, HWND hwnd, UINT first, UINT
*/
BOOL
WINAPI
IsDialogMessageA
(
HWND
hwndDlg
,
LPMSG
pmsg
)
{
enum
wm_char_mapping
mapping
;
MSG
msg
=
*
pmsg
;
map_wparam_AtoW
(
msg
.
message
,
&
msg
.
wParam
,
WMCHAR_MAP_NOMAPPING
);
mapping
=
GetSystemMetrics
(
SM_DBCSENABLED
)
?
WMCHAR_MAP_ISDIALOGMESSAGE
:
WMCHAR_MAP_NOMAPPING
;
if
(
!
map_wparam_AtoW
(
msg
.
message
,
&
msg
.
wParam
,
mapping
))
return
TRUE
;
return
IsDialogMessageW
(
hwndDlg
,
&
msg
);
}
...
...
dlls/user32/tests/dialog.c
View file @
109d15ab
...
...
@@ -575,10 +575,7 @@ static LRESULT CALLBACK test_IsDialogMessageA_proc(HWND hwnd, UINT msg, WPARAM w
{
case
WM_CHAR
:
if
(
GetSystemMetrics
(
SM_DBCSENABLED
))
{
todo_wine
ok
(
wparam
==
0x5b57
,
"Got unexpected wparam %#Ix.
\n
"
,
wparam
);
}
else
ok
(
wparam
==
0x3f
,
"Got unexpected wparam %#Ix.
\n
"
,
wparam
);
wm_char_count
++
;
...
...
@@ -879,7 +876,6 @@ static void test_IsDialogMessage(void)
DispatchMessageA
(
&
msg
);
}
}
todo_wine_if
(
GetSystemMetrics
(
SM_DBCSENABLED
))
ok
(
wm_char_count
==
1
,
"Got unexpected WM_CHAR count %d.
\n
"
,
wm_char_count
);
DestroyWindow
(
g_hwndMain
);
}
...
...
include/ntuser.h
View file @
109d15ab
...
...
@@ -135,6 +135,7 @@ enum wm_char_mapping
WMCHAR_MAP_RECVMESSAGE
,
WMCHAR_MAP_DISPATCHMESSAGE
,
WMCHAR_MAP_CALLWINDOWPROC
,
WMCHAR_MAP_ISDIALOGMESSAGE
,
WMCHAR_MAP_COUNT
,
WMCHAR_MAP_NOMAPPING
=
WMCHAR_MAP_COUNT
};
...
...
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