Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8387d2fe
Commit
8387d2fe
authored
Jan 10, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Feb 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Always use unicode messages for subclass procedures.
Final Fantasy XIV Online depends on this for its text input. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=43073
parent
591f585a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
18 deletions
+10
-18
commctrl.c
dlls/comctl32/commctrl.c
+3
-10
subclass.c
dlls/comctl32/tests/subclass.c
+7
-8
No files found.
dlls/comctl32/commctrl.c
View file @
8387d2fe
...
...
@@ -1104,12 +1104,8 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
/* set window procedure to our own and save the current one */
stack
->
is_unicode
=
IsWindowUnicode
(
hWnd
);
if
(
stack
->
is_unicode
)
stack
->
origproc
=
(
WNDPROC
)
SetWindowLongPtrW
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
COMCTL32_SubclassProc
);
else
stack
->
origproc
=
(
WNDPROC
)
SetWindowLongPtrA
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
COMCTL32_SubclassProc
);
stack
->
origproc
=
(
WNDPROC
)
SetWindowLongPtrW
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
COMCTL32_SubclassProc
);
}
else
{
/* Check to see if we have called this function with the same uIDSubClass
...
...
@@ -1332,10 +1328,7 @@ LRESULT WINAPI DefSubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
/* If we are at the end of stack then we have to call the original
* window procedure */
if
(
!
stack
->
stackpos
)
{
if
(
stack
->
is_unicode
)
ret
=
CallWindowProcW
(
stack
->
origproc
,
hWnd
,
uMsg
,
wParam
,
lParam
);
else
ret
=
CallWindowProcA
(
stack
->
origproc
,
hWnd
,
uMsg
,
wParam
,
lParam
);
ret
=
CallWindowProcW
(
stack
->
origproc
,
hWnd
,
uMsg
,
wParam
,
lParam
);
}
else
{
const
SUBCLASSPROCS
*
proc
=
stack
->
stackpos
;
stack
->
stackpos
=
stack
->
stackpos
->
next
;
...
...
dlls/comctl32/tests/subclass.c
View file @
8387d2fe
...
...
@@ -202,7 +202,7 @@ static LRESULT WINAPI wnd_proc_1(HWND hwnd, UINT message, WPARAM wParam, LPARAM
DWORD
flags
=
GetWindowLongA
(
hwnd
,
GWLP_USERDATA
);
struct
message
msg
;
todo_wine_if
(
flags
&
EXPECT_UNICODE
)
check_unicode
(
hwnd
,
flags
);
check_unicode
(
hwnd
,
flags
);
if
(
message
==
WM_USER
)
{
msg
.
wParam
=
wParam
;
...
...
@@ -234,7 +234,7 @@ static LRESULT WINAPI wnd_proc_sub(HWND hwnd, UINT message, WPARAM wParam, LPARA
DWORD
flags
=
GetWindowLongA
(
hwnd
,
GWLP_USERDATA
);
struct
message
msg
;
todo_wine_if
(
flags
&
EXPECT_UNICODE
)
check_unicode
(
hwnd
,
flags
);
check_unicode
(
hwnd
,
flags
);
if
(
message
==
WM_USER
)
{
msg
.
wParam
=
wParam
;
...
...
@@ -245,22 +245,21 @@ static LRESULT WINAPI wnd_proc_sub(HWND hwnd, UINT message, WPARAM wParam, LPARA
if
(
dwRefData
&
DELETE_SELF
)
{
pRemoveWindowSubclass
(
hwnd
,
wnd_proc_sub
,
uldSubclass
);
pRemoveWindowSubclass
(
hwnd
,
wnd_proc_sub
,
uldSubclass
);
todo_wine_if
(
flags
&
EXPECT_UNICODE
)
check_unicode
(
hwnd
,
flags
);
check_unicode
(
hwnd
,
flags
);
}
if
(
dwRefData
&
DELETE_PREV
)
{
pRemoveWindowSubclass
(
hwnd
,
wnd_proc_sub
,
uldSubclass
-
1
);
todo_wine_if
(
flags
&
EXPECT_UNICODE
)
check_unicode
(
hwnd
,
flags
);
check_unicode
(
hwnd
,
flags
);
}
if
(
dwRefData
&
SEND_NEST
)
{
SendMessageA
(
hwnd
,
WM_USER
,
wParam
+
1
,
0
);
todo_wine_if
(
flags
&
EXPECT_UNICODE
)
check_unicode
(
hwnd
,
flags
);
check_unicode
(
hwnd
,
flags
);
}
}
}
if
(
message
==
WM_CHAR
)
{
todo_wine
ok
(
wParam
==
0x30c2
,
"got wParam %#Ix
\n
"
,
wParam
);
}
return
pDefSubclassProc
(
hwnd
,
message
,
wParam
,
lParam
);
...
...
@@ -277,7 +276,7 @@ static void test_subclass(void)
ret
=
pSetWindowSubclass
(
hwnd
,
wnd_proc_sub
,
2
,
0
);
ok
(
ret
==
TRUE
,
"Expected TRUE
\n
"
);
todo_wine
check_unicode
(
hwnd
,
EXPECT_UNICODE
);
check_unicode
(
hwnd
,
EXPECT_UNICODE
);
SetWindowLongA
(
hwnd
,
GWLP_USERDATA
,
EXPECT_UNICODE
);
SendMessageA
(
hwnd
,
WM_USER
,
1
,
0
);
...
...
@@ -287,7 +286,7 @@ static void test_subclass(void)
ret
=
pSetWindowSubclass
(
hwnd
,
wnd_proc_sub
,
2
,
DELETE_SELF
);
ok
(
ret
==
TRUE
,
"Expected TRUE
\n
"
);
todo_wine
check_unicode
(
hwnd
,
EXPECT_UNICODE
);
check_unicode
(
hwnd
,
EXPECT_UNICODE
);
SendMessageA
(
hwnd
,
WM_USER
,
1
,
1
);
ok_sequence
(
Sub_DeletedTest
,
"Deleted"
);
...
...
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