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
591f585a
Commit
591f585a
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: Save unicode window nature on SetWindowSubclass call.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=43073
parent
711f05c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
comctl32.h
dlls/comctl32/comctl32.h
+1
-0
commctrl.c
dlls/comctl32/commctrl.c
+6
-5
No files found.
dlls/comctl32/comctl32.h
View file @
591f585a
...
...
@@ -209,6 +209,7 @@ typedef struct
SUBCLASSPROCS
*
SubclassProcs
;
SUBCLASSPROCS
*
stackpos
;
WNDPROC
origproc
;
int
is_unicode
;
int
running
;
}
SUBCLASS_INFO
,
*
LPSUBCLASS_INFO
;
...
...
dlls/comctl32/commctrl.c
View file @
591f585a
...
...
@@ -1103,7 +1103,8 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
SetPropW
(
hWnd
,
COMCTL32_wSubclass
,
stack
);
/* set window procedure to our own and save the current one */
if
(
IsWindowUnicode
(
hWnd
))
stack
->
is_unicode
=
IsWindowUnicode
(
hWnd
);
if
(
stack
->
is_unicode
)
stack
->
origproc
=
(
WNDPROC
)
SetWindowLongPtrW
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
COMCTL32_SubclassProc
);
else
...
...
@@ -1127,7 +1128,7 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
proc
=
Alloc
(
sizeof
(
SUBCLASSPROCS
));
if
(
!
proc
)
{
ERR
(
"Failed to allocate subclass entry in stack
\n
"
);
if
(
IsWindowUnicode
(
hWnd
)
)
if
(
stack
->
is_unicode
)
SetWindowLongPtrW
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
stack
->
origproc
);
else
SetWindowLongPtrA
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
stack
->
origproc
);
...
...
@@ -1246,7 +1247,7 @@ BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR u
if
(
!
stack
->
SubclassProcs
&&
!
stack
->
running
)
{
TRACE
(
"Last Subclass removed, cleaning up
\n
"
);
/* clean up our heap and reset the original window procedure */
if
(
IsWindowUnicode
(
hWnd
)
)
if
(
stack
->
is_unicode
)
SetWindowLongPtrW
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
stack
->
origproc
);
else
SetWindowLongPtrA
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
stack
->
origproc
);
...
...
@@ -1288,7 +1289,7 @@ static LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam
if
(
!
stack
->
SubclassProcs
&&
!
stack
->
running
)
{
TRACE
(
"Last Subclass removed, cleaning up
\n
"
);
/* clean up our heap and reset the original window procedure */
if
(
IsWindowUnicode
(
hWnd
)
)
if
(
stack
->
is_unicode
)
SetWindowLongPtrW
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
stack
->
origproc
);
else
SetWindowLongPtrA
(
hWnd
,
GWLP_WNDPROC
,
(
DWORD_PTR
)
stack
->
origproc
);
...
...
@@ -1331,7 +1332,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
(
IsWindowUnicode
(
hWnd
)
)
if
(
stack
->
is_unicode
)
ret
=
CallWindowProcW
(
stack
->
origproc
,
hWnd
,
uMsg
,
wParam
,
lParam
);
else
ret
=
CallWindowProcA
(
stack
->
origproc
,
hWnd
,
uMsg
,
wParam
,
lParam
);
...
...
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