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
c9c69dff
Commit
c9c69dff
authored
Jul 03, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Support undocumented SIF_RETURNPREV flag in set_scroll_info.
parent
f059013a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
3 deletions
+22
-3
scroll.c
dlls/user32/tests/scroll.c
+13
-0
scroll.c
dlls/win32u/scroll.c
+6
-3
ntuser.h
include/ntuser.h
+3
-0
No files found.
dlls/user32/tests/scroll.c
View file @
c9c69dff
...
...
@@ -671,6 +671,19 @@ static void test_SetScrollInfo(void)
ret
=
IsWindowEnabled
(
hScroll
);
ok
(
ret
,
"Unexpected enabled state.
\n
"
);
EnableScrollBar
(
mainwnd
,
SB_CTL
,
ESB_ENABLE_BOTH
);
si
.
fMask
=
SIF_POS
;
si
.
nPos
=
3
;
ret
=
SetScrollInfo
(
mainwnd
,
SB_HORZ
,
&
si
,
FALSE
);
ok
(
ret
==
3
,
"SetScrollInfo returned %d
\n
"
,
ret
);
/* undocumented flag making SetScrollInfo return previous position */
si
.
fMask
=
SIF_POS
|
0x1000
;
si
.
nPos
=
4
;
ret
=
SetScrollInfo
(
mainwnd
,
SB_HORZ
,
&
si
,
FALSE
);
ok
(
ret
==
3
,
"SetScrollInfo returned %d
\n
"
,
ret
);
DestroyWindow
(
hScroll
);
DestroyWindow
(
mainwnd
);
}
...
...
dlls/win32u/scroll.c
View file @
c9c69dff
...
...
@@ -824,7 +824,7 @@ void track_scroll_bar( HWND hwnd, int scrollbar, POINT pt )
*/
static
inline
BOOL
validate_scroll_info
(
const
SCROLLINFO
*
info
)
{
return
!
(
info
->
fMask
&
~
(
SIF_ALL
|
SIF_DISABLENOSCROLL
)
||
return
!
(
info
->
fMask
&
~
(
SIF_ALL
|
SIF_DISABLENOSCROLL
|
SIF_RETURNPREV
)
||
(
info
->
cbSize
!=
sizeof
(
*
info
)
&&
info
->
cbSize
!=
sizeof
(
*
info
)
-
sizeof
(
info
->
nTrackPos
)));
}
...
...
@@ -862,7 +862,7 @@ static int set_scroll_info( HWND hwnd, int bar, const SCROLLINFO *info, BOOL red
{
struct
scroll_info
*
scroll
;
UINT
new_flags
;
int
action
=
0
,
ret
;
int
action
=
0
,
ret
=
0
;
/* handle invalid data structure */
if
(
!
validate_scroll_info
(
info
)
||
...
...
@@ -878,6 +878,9 @@ static int set_scroll_info( HWND hwnd, int bar, const SCROLLINFO *info, BOOL red
TRACE
(
"
\n
"
);
}
/* undocumented flag, return previous position instead of modified */
if
(
info
->
fMask
&
SIF_RETURNPREV
)
ret
=
scroll
->
curVal
;
/* Set the page size */
if
((
info
->
fMask
&
SIF_PAGE
)
&&
scroll
->
page
!=
info
->
nPage
)
{
...
...
@@ -970,7 +973,7 @@ static int set_scroll_info( HWND hwnd, int bar, const SCROLLINFO *info, BOOL red
}
done:
ret
=
scroll
->
curVal
;
if
(
!
(
info
->
fMask
&
SIF_RETURNPREV
))
ret
=
scroll
->
curVal
;
release_scroll_info_ptr
(
scroll
);
if
(
action
&
SA_SSI_HIDE
)
show_scroll_bar
(
hwnd
,
bar
,
FALSE
,
FALSE
);
...
...
include/ntuser.h
View file @
c9c69dff
...
...
@@ -269,6 +269,9 @@ struct send_message_callback_params
/* NtUserScrollWindowEx flag */
#define SW_NODCCACHE 0x8000
/* NtUserSetScrollInfo flag */
#define SIF_RETURNPREV 0x1000
/* NtUserInitializeClientPfnArrays parameter, not compatible with Windows */
struct
user_client_procs
{
...
...
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