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
844177d5
Commit
844177d5
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 EM_SETTABSTOPS and LB_SETTABSTOPS.
parent
314c94e1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
5 deletions
+25
-5
winproc.c
dlls/user32/winproc.c
+2
-3
message.c
dlls/win32u/message.c
+9
-0
win32u.c
dlls/win32u/tests/win32u.c
+14
-2
No files found.
dlls/user32/winproc.c
View file @
844177d5
...
...
@@ -875,11 +875,8 @@ BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
case
EM_SETRECT
:
case
EM_SETRECTNP
:
case
EM_GETLINE
:
break
;
case
EM_SETTABSTOPS
:
case
LB_SETTABSTOPS
:
if
(
!*
wparam
)
return
TRUE
;
minsize
=
*
wparam
*
sizeof
(
UINT
);
break
;
case
CB_ADDSTRING
:
case
CB_INSERTSTRING
:
...
...
@@ -1083,6 +1080,8 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size )
case
EM_SETRECT
:
case
EM_SETRECTNP
:
case
EM_GETLINE
:
case
EM_SETTABSTOPS
:
case
LB_SETTABSTOPS
:
{
LRESULT
*
result_ptr
=
(
LRESULT
*
)
buffer
-
1
;
*
result_ptr
=
result
;
...
...
dlls/win32u/message.c
View file @
844177d5
...
...
@@ -594,6 +594,11 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
*
lparam
=
(
LPARAM
)(
len_ptr
+
1
);
return
TRUE
;
}
case
EM_SETTABSTOPS
:
case
LB_SETTABSTOPS
:
if
(
!*
wparam
)
return
TRUE
;
minsize
=
*
wparam
*
sizeof
(
UINT
);
break
;
case
WM_WINE_SETWINDOWPOS
:
{
WINDOWPOS
wp
;
...
...
@@ -1410,6 +1415,10 @@ size_t user_message_size( UINT message, WPARAM wparam, LPARAM lparam, BOOL other
case
EM_GETLINE
:
size
=
max
(
*
(
WORD
*
)
lparam
*
char_size
(
ansi
),
sizeof
(
WORD
)
);
break
;
case
EM_SETTABSTOPS
:
case
LB_SETTABSTOPS
:
size
=
wparam
*
sizeof
(
UINT
);
break
;
}
return
size
;
...
...
dlls/win32u/tests/win32u.c
View file @
844177d5
...
...
@@ -1384,8 +1384,9 @@ static void check_params( const struct lparam_hook_test *test, UINT message,
if
(
lparam
==
(
LPARAM
)
lparam_buffer
)
return
;
ok
((
LPARAM
)
&
message
<
lparam
&&
lparam
<
(
LPARAM
)
NtCurrentTeb
()
->
Tib
.
StackBase
,
"lparam is not on the stack
\n
"
);
if
(
sizeof
(
void
*
)
!=
4
||
(
test
->
message
!=
EM_SETTABSTOPS
&&
test
->
message
!=
LB_SETTABSTOPS
))
ok
(
(
LPARAM
)
&
message
<
lparam
&&
lparam
<
(
LPARAM
)
NtCurrentTeb
()
->
Tib
.
StackBase
,
"lparam is not on the stack
\n
"
);
switch
(
test
->
message
)
{
...
...
@@ -1679,6 +1680,7 @@ static void test_wndproc_hook(void)
static
const
SCROLLBARINFO
sbi_in
=
{
.
xyThumbTop
=
6
};
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
struct
lparam_hook_test
lparam_hook_tests
[]
=
{
...
...
@@ -1885,6 +1887,16 @@ static void test_wndproc_hook(void)
.
lparam
=
L"\x8""2345678"
,
.
lparam_size
=
sizeof
(
strbufW
),
.
change_lparam
=
L"abc
\0
defg"
,
.
check_size
=
sizeof
(
WCHAR
),
.
check_lparam
=
L"abc
\0
""5678"
,
},
{
"EM_SETTABSTOPS"
,
EM_SETTABSTOPS
,
.
wparam
=
ARRAYSIZE
(
tabstops_in
),
.
lparam_size
=
sizeof
(
tabstops_in
),
.
lparam
=
&
tabstops_in
,
.
poison_lparam
=
TRUE
,
.
check_size
=
sizeof
(
tabstops_in
),
},
{
"LB_SETTABSTOPS"
,
LB_SETTABSTOPS
,
.
wparam
=
ARRAYSIZE
(
tabstops_in
),
.
lparam_size
=
sizeof
(
tabstops_in
),
.
lparam
=
&
tabstops_in
,
.
poison_lparam
=
TRUE
,
.
check_size
=
sizeof
(
tabstops_in
),
},
/* messages that don't change lparam */
{
"WM_USER"
,
WM_USER
},
{
"WM_NOTIFY"
,
WM_NOTIFY
},
...
...
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