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
c66984d1
Commit
c66984d1
authored
Jul 18, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Use user message packing for LB_GETSELITEMS.
parent
6b592e81
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
5 deletions
+17
-5
winproc.c
dlls/user32/winproc.c
+1
-2
message.c
dlls/win32u/message.c
+9
-3
win32u.c
dlls/win32u/tests/win32u.c
+6
-0
user.c
dlls/wow64win/user.c
+1
-0
No files found.
dlls/user32/winproc.c
View file @
c66984d1
...
...
@@ -875,9 +875,7 @@ BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
case
LB_SELECTSTRING
:
case
CB_GETLBTEXT
:
case
LB_GETTEXT
:
break
;
case
LB_GETSELITEMS
:
if
(
!
get_buffer_space
(
buffer
,
*
wparam
*
sizeof
(
UINT
),
size
))
return
FALSE
;
break
;
case
WM_NEXTMENU
:
{
...
...
@@ -1063,6 +1061,7 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size )
case
LB_SELECTSTRING
:
case
CB_GETLBTEXT
:
case
LB_GETTEXT
:
case
LB_GETSELITEMS
:
{
LRESULT
*
result_ptr
=
(
LRESULT
*
)
buffer
-
1
;
*
result_ptr
=
result
;
...
...
dlls/win32u/message.c
View file @
c66984d1
...
...
@@ -631,6 +631,9 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
if
(
!
get_buffer_space
(
buffer
,
size
,
prev_size
))
return
FALSE
;
break
;
}
case
LB_GETSELITEMS
:
if
(
!
get_buffer_space
(
buffer
,
*
wparam
*
sizeof
(
UINT
),
size
))
return
FALSE
;
break
;
case
WM_WINE_SETWINDOWPOS
:
{
WINDOWPOS
wp
;
...
...
@@ -1470,6 +1473,9 @@ size_t user_message_size( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam,
size
=
send_message_timeout
(
hwnd
,
LB_GETTEXTLEN
,
wparam
,
0
,
SMTO_NORMAL
,
0
,
ansi
);
size
=
(
size
+
1
)
*
char_size
(
ansi
);
break
;
case
LB_GETSELITEMS
:
size
=
wparam
*
sizeof
(
UINT
);
break
;
}
return
size
;
...
...
@@ -1640,6 +1646,9 @@ static void copy_user_result( void *buffer, size_t size, LRESULT result, UINT me
case
EM_GETLINE
:
copy_size
=
string_size
(
buffer
,
ansi
);
break
;
case
LB_GETSELITEMS
:
copy_size
=
wparam
*
sizeof
(
UINT
);
break
;
default:
return
;
}
...
...
@@ -1667,9 +1676,6 @@ static void copy_reply( LRESULT result, HWND hwnd, UINT message, WPARAM wparam,
case
WM_MOVING
:
copy_size
=
sizeof
(
RECT
);
break
;
case
LB_GETSELITEMS
:
copy_size
=
wparam
*
sizeof
(
UINT
);
break
;
case
WM_MDIGETACTIVE
:
if
(
lparam
)
copy_size
=
sizeof
(
BOOL
);
break
;
...
...
dlls/win32u/tests/win32u.c
View file @
c66984d1
...
...
@@ -1681,6 +1681,7 @@ static void test_wndproc_hook(void)
static
const
SCROLLBARINFO
sbi_out
=
{
.
xyThumbTop
=
60
};
static
const
DWORD
dw_in
=
1
,
dw_out
=
2
;
static
const
UINT32
tabstops_in
[
2
]
=
{
3
,
4
};
static
const
UINT32
items_out
[
2
]
=
{
1
,
2
};
static
const
struct
lparam_hook_test
lparam_hook_tests
[]
=
{
...
...
@@ -1891,6 +1892,11 @@ static void test_wndproc_hook(void)
.
lparam_size
=
sizeof
(
tabstops_in
),
.
lparam
=
&
tabstops_in
,
.
poison_lparam
=
TRUE
,
.
check_size
=
sizeof
(
tabstops_in
),
},
{
"LB_GETSELITEMS"
,
LB_GETSELITEMS
,
.
wparam
=
ARRAYSIZE
(
items_out
),
.
msg_result
=
ARRAYSIZE
(
items_out
),
.
lparam_size
=
sizeof
(
items_out
),
.
change_lparam
=
items_out
,
},
/* messages that don't change lparam */
{
"WM_USER"
,
WM_USER
},
{
"WM_NOTIFY"
,
WM_NOTIFY
},
...
...
dlls/wow64win/user.c
View file @
c66984d1
...
...
@@ -846,6 +846,7 @@ static size_t packed_result_32to64( UINT message, WPARAM wparam, const void *par
case
EM_GETLINE
:
case
CB_GETLBTEXT
:
case
LB_GETTEXT
:
case
LB_GETSELITEMS
:
break
;
default:
...
...
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