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
9d3058aa
Commit
9d3058aa
authored
Jul 03, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use SIF_RETURNPREV for SetScrollPos implementation.
parent
c9c69dff
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
scroll.c
dlls/user32/scroll.c
+4
-8
scroll.c
dlls/user32/tests/scroll.c
+0
-2
No files found.
dlls/user32/scroll.c
View file @
9d3058aa
...
...
@@ -518,18 +518,14 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetScrollInfo(HWND hwnd, INT nBar, LPSCROLLINFO in
* Note the ambiguity when 0 is returned. Use GetLastError
* to make sure there was an error (and to know which one).
*/
INT
WINAPI
DECLSPEC_HOTPATCH
SetScrollPos
(
HWND
hwnd
,
INT
nBar
,
INT
nPos
,
BOOL
bRedraw
)
int
WINAPI
DECLSPEC_HOTPATCH
SetScrollPos
(
HWND
hwnd
,
int
bar
,
int
pos
,
BOOL
redraw
)
{
SCROLLINFO
info
;
SCROLLBAR_INFO
*
infoPtr
;
INT
oldPos
=
0
;
if
((
infoPtr
=
SCROLL_GetInternalInfo
(
hwnd
,
nBar
,
FALSE
)))
oldPos
=
infoPtr
->
curVal
;
info
.
cbSize
=
sizeof
(
info
);
info
.
nPos
=
nPos
;
info
.
fMask
=
SIF_POS
;
NtUserSetScrollInfo
(
hwnd
,
nBar
,
&
info
,
bRedraw
);
return
oldPos
;
info
.
nPos
=
pos
;
info
.
fMask
=
SIF_POS
|
SIF_RETURNPREV
;
return
NtUserSetScrollInfo
(
hwnd
,
bar
,
&
info
,
redraw
);
}
...
...
dlls/user32/tests/scroll.c
View file @
9d3058aa
...
...
@@ -738,7 +738,6 @@ static void test_subclass(void)
res
=
SetScrollPos
(
hwnd
,
SB_CTL
,
1
,
FALSE
);
ok
(
res
==
2
,
"SetScrollPos returned %Iu
\n
"
,
res
);
ok
(
set_scrollinfo
.
cbSize
==
sizeof
(
SCROLLINFO
),
"cbSize = %u
\n
"
,
set_scrollinfo
.
cbSize
);
todo_wine
ok
(
set_scrollinfo
.
fMask
==
(
0x1000
|
SIF_POS
),
"fMask = %x
\n
"
,
set_scrollinfo
.
fMask
);
ok
(
set_scrollinfo
.
nPos
==
1
,
"nPos = %x
\n
"
,
set_scrollinfo
.
nPos
);
...
...
@@ -780,7 +779,6 @@ static void test_subclass(void)
res
=
SetScrollPos
(
hwnd
,
SB_CTL
,
1
,
FALSE
);
ok
(
res
==
0
,
"SetScrollPos returned %Iu
\n
"
,
res
);
ok
(
set_scrollinfo
.
cbSize
==
sizeof
(
SCROLLINFO
),
"cbSize = %u
\n
"
,
set_scrollinfo
.
cbSize
);
todo_wine
ok
(
set_scrollinfo
.
fMask
==
(
0x1000
|
SIF_POS
),
"fMask = %x
\n
"
,
set_scrollinfo
.
fMask
);
ok
(
set_scrollinfo
.
nPos
==
1
,
"nPos = %x
\n
"
,
set_scrollinfo
.
nPos
);
...
...
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