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
f231c7be
Commit
f231c7be
authored
Jul 18, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Use user message packing for WM_COMPAREITEM.
parent
7f4ffc7c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
14 deletions
+42
-14
winproc.c
dlls/user32/winproc.c
+1
-14
message.c
dlls/win32u/message.c
+18
-0
win32u.c
dlls/win32u/tests/win32u.c
+6
-0
user.c
dlls/wow64win/user.c
+17
-0
No files found.
dlls/user32/winproc.c
View file @
f231c7be
...
...
@@ -844,22 +844,8 @@ BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
case
WM_DRAWITEM
:
case
WM_MEASUREITEM
:
case
WM_DELETEITEM
:
break
;
case
WM_COMPAREITEM
:
{
COMPAREITEMSTRUCT
cis
;
if
(
size
<
sizeof
(
ps
->
cis
))
return
FALSE
;
cis
.
CtlType
=
ps
->
cis
.
CtlType
;
cis
.
CtlID
=
ps
->
cis
.
CtlID
;
cis
.
hwndItem
=
unpack_handle
(
ps
->
cis
.
hwndItem
);
cis
.
itemID1
=
ps
->
cis
.
itemID1
;
cis
.
itemData1
=
(
ULONG_PTR
)
unpack_ptr
(
ps
->
cis
.
itemData1
);
cis
.
itemID2
=
ps
->
cis
.
itemID2
;
cis
.
itemData2
=
(
ULONG_PTR
)
unpack_ptr
(
ps
->
cis
.
itemData2
);
cis
.
dwLocaleId
=
ps
->
cis
.
dwLocaleId
;
memcpy
(
*
buffer
,
&
cis
,
sizeof
(
cis
)
);
break
;
}
case
WM_WINDOWPOSCHANGING
:
case
WM_WINDOWPOSCHANGED
:
{
...
...
@@ -1150,6 +1136,7 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size )
case
WM_GETMINMAXINFO
:
case
WM_MEASUREITEM
:
case
WM_DELETEITEM
:
case
WM_COMPAREITEM
:
{
LRESULT
*
result_ptr
=
(
LRESULT
*
)
buffer
-
1
;
*
result_ptr
=
result
;
...
...
dlls/win32u/message.c
View file @
f231c7be
...
...
@@ -474,6 +474,21 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
memcpy
(
*
buffer
,
&
dls
,
sizeof
(
dls
)
);
break
;
}
case
WM_COMPAREITEM
:
{
COMPAREITEMSTRUCT
cis
;
if
(
size
<
sizeof
(
ps
->
cis
))
return
FALSE
;
cis
.
CtlType
=
ps
->
cis
.
CtlType
;
cis
.
CtlID
=
ps
->
cis
.
CtlID
;
cis
.
hwndItem
=
wine_server_ptr_handle
(
ps
->
cis
.
hwndItem
);
cis
.
itemID1
=
ps
->
cis
.
itemID1
;
cis
.
itemData1
=
(
ULONG_PTR
)
unpack_ptr
(
ps
->
cis
.
itemData1
);
cis
.
itemID2
=
ps
->
cis
.
itemID2
;
cis
.
itemData2
=
(
ULONG_PTR
)
unpack_ptr
(
ps
->
cis
.
itemData2
);
cis
.
dwLocaleId
=
ps
->
cis
.
dwLocaleId
;
memcpy
(
*
buffer
,
&
cis
,
sizeof
(
cis
)
);
break
;
}
case
WM_WINE_SETWINDOWPOS
:
{
WINDOWPOS
wp
;
...
...
@@ -1270,6 +1285,9 @@ size_t user_message_size( UINT message, WPARAM wparam, LPARAM lparam, BOOL other
case
WM_DELETEITEM
:
size
=
sizeof
(
DELETEITEMSTRUCT
);
break
;
case
WM_COMPAREITEM
:
size
=
sizeof
(
COMPAREITEMSTRUCT
);
break
;
}
return
size
;
...
...
dlls/win32u/tests/win32u.c
View file @
f231c7be
...
...
@@ -1625,6 +1625,7 @@ static void test_wndproc_hook(void)
static
const
MEASUREITEMSTRUCT
mis_in
=
{
.
itemID
=
1
};
static
const
MEASUREITEMSTRUCT
mis_out
=
{
.
itemID
=
2
,
.
CtlType
=
3
,
.
CtlID
=
4
,
.
itemData
=
5
};
static
const
DELETEITEMSTRUCT
dis_in
=
{
.
itemID
=
1
};
static
const
COMPAREITEMSTRUCT
cis_in
=
{
.
itemID1
=
1
};
static
const
struct
lparam_hook_test
lparam_hook_tests
[]
=
{
...
...
@@ -1724,6 +1725,11 @@ static void test_wndproc_hook(void)
.
lparam_size
=
sizeof
(
dis_in
),
.
lparam
=
&
dis_in
,
.
poison_lparam
=
TRUE
,
.
check_size
=
sizeof
(
dis_in
),
},
{
"WM_COMPAREITEM"
,
WM_COMPAREITEM
,
.
wparam
=
10
,
.
lparam_size
=
sizeof
(
cis_in
),
.
lparam
=
&
cis_in
,
.
poison_lparam
=
TRUE
,
.
check_size
=
sizeof
(
cis_in
),
},
/* messages that don't change lparam */
{
"WM_USER"
,
WM_USER
},
{
"WM_NOTIFY"
,
WM_NOTIFY
},
...
...
dlls/wow64win/user.c
View file @
f231c7be
...
...
@@ -698,6 +698,23 @@ static size_t packed_message_64to32( UINT message, WPARAM wparam,
memcpy
(
params32
,
&
dis32
,
sizeof
(
dis32
)
);
return
sizeof
(
dis32
);
}
case
WM_COMPAREITEM
:
{
COMPAREITEMSTRUCT32
cis32
;
const
COMPAREITEMSTRUCT
*
cis64
=
params64
;
cis32
.
CtlType
=
cis64
->
CtlType
;
cis32
.
CtlID
=
cis64
->
CtlID
;
cis32
.
hwndItem
=
HandleToLong
(
cis64
->
hwndItem
);
cis32
.
itemID1
=
cis64
->
itemID1
;
cis32
.
itemData1
=
cis64
->
itemData1
;
cis32
.
itemID2
=
cis64
->
itemID2
;
cis32
.
itemData2
=
cis64
->
itemData2
;
cis32
.
dwLocaleId
=
cis64
->
dwLocaleId
;
memcpy
(
params32
,
&
cis32
,
sizeof
(
cis32
)
);
return
sizeof
(
cis32
);
}
}
memmove
(
params32
,
params64
,
size
);
...
...
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