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
10254e32
Commit
10254e32
authored
Jul 18, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Use user message packing for scroll info messages.
parent
a883b3c5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
15 deletions
+51
-15
winproc.c
dlls/user32/winproc.c
+6
-9
message.c
dlls/win32u/message.c
+23
-6
win32u.c
dlls/win32u/tests/win32u.c
+19
-0
user.c
dlls/wow64win/user.c
+3
-0
No files found.
dlls/user32/winproc.c
View file @
10254e32
...
...
@@ -857,19 +857,13 @@ BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
case
WM_STYLECHANGING
:
case
WM_STYLECHANGED
:
case
WM_GETDLGCODE
:
break
;
case
WM_NOTIFY
:
/* WM_NOTIFY cannot be sent across processes (MSDN) */
return
FALSE
;
case
SBM_SETSCROLLINFO
:
minsize
=
sizeof
(
SCROLLINFO
);
break
;
case
SBM_GETSCROLLINFO
:
if
(
!
get_buffer_space
(
buffer
,
sizeof
(
SCROLLINFO
),
size
))
return
FALSE
;
break
;
case
SBM_GETSCROLLBARINFO
:
if
(
!
get_buffer_space
(
buffer
,
sizeof
(
SCROLLBARINFO
),
size
))
return
FALSE
;
break
;
case
WM_NOTIFY
:
/* WM_NOTIFY cannot be sent across processes (MSDN) */
return
FALSE
;
case
EM_GETSEL
:
case
SBM_GETRANGE
:
case
CB_GETEDITSEL
:
...
...
@@ -1090,6 +1084,9 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size )
case
WM_STYLECHANGING
:
case
WM_STYLECHANGED
:
case
WM_GETDLGCODE
:
case
SBM_SETSCROLLINFO
:
case
SBM_GETSCROLLINFO
:
case
SBM_GETSCROLLBARINFO
:
{
LRESULT
*
result_ptr
=
(
LRESULT
*
)
buffer
-
1
;
*
result_ptr
=
result
;
...
...
dlls/win32u/message.c
View file @
10254e32
...
...
@@ -555,6 +555,15 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
break
;
}
return
TRUE
;
case
SBM_SETSCROLLINFO
:
minsize
=
sizeof
(
SCROLLINFO
);
break
;
case
SBM_GETSCROLLINFO
:
if
(
!
get_buffer_space
(
buffer
,
sizeof
(
SCROLLINFO
),
size
))
return
FALSE
;
break
;
case
SBM_GETSCROLLBARINFO
:
if
(
!
get_buffer_space
(
buffer
,
sizeof
(
SCROLLBARINFO
),
size
))
return
FALSE
;
break
;
case
WM_WINE_SETWINDOWPOS
:
{
WINDOWPOS
wp
;
...
...
@@ -1349,6 +1358,13 @@ size_t user_message_size( UINT message, WPARAM wparam, LPARAM lparam, BOOL other
case
WM_GETDLGCODE
:
size
=
sizeof
(
MSG
);
break
;
case
SBM_SETSCROLLINFO
:
case
SBM_GETSCROLLINFO
:
size
=
sizeof
(
SCROLLINFO
);
break
;
case
SBM_GETSCROLLBARINFO
:
size
=
sizeof
(
SCROLLBARINFO
);
break
;
}
return
size
;
...
...
@@ -1480,6 +1496,13 @@ static void copy_user_result( void *buffer, size_t size, LRESULT result, UINT me
case
WM_STYLECHANGING
:
copy_size
=
sizeof
(
STYLESTRUCT
);
break
;
case
SBM_SETSCROLLINFO
:
case
SBM_GETSCROLLINFO
:
copy_size
=
sizeof
(
SCROLLINFO
);
break
;
case
SBM_GETSCROLLBARINFO
:
copy_size
=
sizeof
(
SCROLLBARINFO
);
break
;
default:
return
;
}
...
...
@@ -1507,12 +1530,6 @@ static void copy_reply( LRESULT result, HWND hwnd, UINT message, WPARAM wparam,
case
CB_GETCOMBOBOXINFO
:
copy_size
=
sizeof
(
COMBOBOXINFO
);
break
;
case
SBM_GETSCROLLINFO
:
copy_size
=
sizeof
(
SCROLLINFO
);
break
;
case
SBM_GETSCROLLBARINFO
:
copy_size
=
sizeof
(
SCROLLBARINFO
);
break
;
case
EM_GETRECT
:
case
LB_GETITEMRECT
:
case
CB_GETDROPPEDCONTROLRECT
:
...
...
dlls/win32u/tests/win32u.c
View file @
10254e32
...
...
@@ -1659,6 +1659,10 @@ static void test_wndproc_hook(void)
static
const
STYLESTRUCT
style_in
=
{
.
styleOld
=
1
,
.
styleNew
=
2
};
static
const
STYLESTRUCT
style_out
=
{
.
styleOld
=
10
,
.
styleNew
=
20
};
static
const
MSG
msg_in
=
{
.
wParam
=
1
,
.
lParam
=
2
};
static
const
SCROLLINFO
si_in
=
{
.
cbSize
=
sizeof
(
si_in
),
.
nPos
=
6
};
static
const
SCROLLINFO
si_out
=
{
.
cbSize
=
sizeof
(
si_in
),
.
nPos
=
60
};
static
const
SCROLLBARINFO
sbi_in
=
{
.
xyThumbTop
=
6
};
static
const
SCROLLBARINFO
sbi_out
=
{
.
xyThumbTop
=
60
};
static
const
struct
lparam_hook_test
lparam_hook_tests
[]
=
{
...
...
@@ -1813,6 +1817,21 @@ static void test_wndproc_hook(void)
.
lparam_size
=
sizeof
(
msg_in
),
.
lparam
=
&
msg_in
,
.
poison_lparam
=
TRUE
,
.
check_size
=
sizeof
(
msg_in
),
},
{
"SBM_SETSCROLLINFO"
,
SBM_SETSCROLLINFO
,
.
lparam_size
=
sizeof
(
si_in
),
.
lparam
=
&
si_in
,
.
change_lparam
=
&
si_out
,
.
check_size
=
sizeof
(
si_in
),
},
{
"SBM_GETSCROLLINFO"
,
SBM_GETSCROLLINFO
,
.
lparam_size
=
sizeof
(
si_in
),
.
lparam
=
&
si_in
,
.
change_lparam
=
&
si_out
,
.
check_size
=
sizeof
(
si_in
),
},
{
"SBM_GETSCROLLBARINFO"
,
SBM_GETSCROLLBARINFO
,
.
lparam_size
=
sizeof
(
sbi_in
),
.
lparam
=
&
sbi_in
,
.
change_lparam
=
&
sbi_out
,
.
check_size
=
sizeof
(
sbi_in
),
},
/* messages that don't change lparam */
{
"WM_USER"
,
WM_USER
},
{
"WM_NOTIFY"
,
WM_NOTIFY
},
...
...
dlls/wow64win/user.c
View file @
10254e32
...
...
@@ -832,6 +832,9 @@ static size_t packed_result_32to64( UINT message, WPARAM wparam, const void *par
case
WM_ASKCBFORMATNAME
:
case
WM_GETMINMAXINFO
:
case
WM_STYLECHANGING
:
case
SBM_SETSCROLLINFO
:
case
SBM_GETSCROLLINFO
:
case
SBM_GETSCROLLBARINFO
:
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