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
8db7b533
Commit
8db7b533
authored
Apr 11, 2005
by
Rein Klazes
Committed by
Alexandre Julliard
Apr 11, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In ScrollWindowEx, if the window already has an update region then add
this to hrgnUpdate. With a conformance test.
parent
f042209c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
3 deletions
+30
-3
win.c
dlls/user/tests/win.c
+15
-1
scroll.c
windows/scroll.c
+15
-2
No files found.
dlls/user/tests/win.c
View file @
8db7b533
...
...
@@ -2647,10 +2647,24 @@ void test_scrollvalidate( HWND parent)
rcu
.
left
,
rcu
.
top
,
rcu
.
right
,
rcu
.
bottom
);
ReleaseDC
(
hwnd1
,
hdc
);
/* test scrolling a window with an update region */
DestroyWindow
(
hwnd2
);
ValidateRect
(
hwnd1
,
NULL
);
SetRect
(
&
rc
,
40
,
40
,
50
,
50
);
InvalidateRect
(
hwnd1
,
&
rc
,
1
);
GetClientRect
(
hwnd1
,
&
rc
);
cliprc
=
rc
;
ScrollWindowEx
(
hwnd1
,
-
10
,
0
,
&
rc
,
&
cliprc
,
hrgn
,
&
rcu
,
SW_SCROLLCHILDREN
|
SW_INVALIDATE
);
if
(
winetest_debug
>
0
)
dump_region
(
hrgn
);
exprgn
=
CreateRectRgn
(
88
,
0
,
98
,
98
);
tmprgn
=
CreateRectRgn
(
30
,
40
,
50
,
50
);
CombineRgn
(
exprgn
,
exprgn
,
tmprgn
,
RGN_OR
);
ok
(
EqualRgn
(
exprgn
,
hrgn
),
"wrong update region
\n
"
);
/* now test ScrollWindowEx with a combination of
* WS_CLIPCHILDREN style and SW_SCROLLCHILDREN flag */
/* make hwnd2 the child of hwnd1 */
DestroyWindow
(
hwnd2
);
hwnd2
=
CreateWindowExA
(
0
,
"static"
,
NULL
,
WS_CHILD
|
WS_VISIBLE
|
WS_BORDER
,
50
,
50
,
100
,
100
,
hwnd1
,
0
,
0
,
NULL
);
...
...
windows/scroll.c
View file @
8db7b533
...
...
@@ -77,6 +77,7 @@ INT WINAPI ScrollWindowEx( HWND hwnd, INT dx, INT dy,
BOOL
bUpdate
=
(
rcUpdate
||
hrgnUpdate
||
flags
&
(
SW_INVALIDATE
|
SW_ERASE
));
int
rdw_flags
;
HRGN
hrgnTemp
;
HRGN
hrgnWinupd
=
0
;
HDC
hDC
;
RECT
rc
,
cliprc
;
RECT
caretrc
;
...
...
@@ -125,15 +126,22 @@ INT WINAPI ScrollWindowEx( HWND hwnd, INT dx, INT dy,
RedrawWindow
(
hwnd
,
NULL
,
hrgnUpdate
,
rdw_flags
);
}
/* Take into account the fact that some damage may have occurred during
* the scroll */
/* If the windows has an update region, this must be
* scrolled as well. Keep a copy in hrgnWinupd
* to be added to hrngUpdate at the end. */
hrgnTemp
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
retVal
=
GetUpdateRgn
(
hwnd
,
hrgnTemp
,
FALSE
);
if
(
retVal
!=
NULLREGION
)
{
HRGN
hrgnClip
=
CreateRectRgnIndirect
(
&
cliprc
);
if
(
!
bOwnRgn
)
{
hrgnWinupd
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
CombineRgn
(
hrgnWinupd
,
hrgnTemp
,
0
,
RGN_COPY
);
}
OffsetRgn
(
hrgnTemp
,
dx
,
dy
);
CombineRgn
(
hrgnTemp
,
hrgnTemp
,
hrgnClip
,
RGN_AND
);
if
(
!
bOwnRgn
)
CombineRgn
(
hrgnWinupd
,
hrgnWinupd
,
hrgnTemp
,
RGN_OR
);
RedrawWindow
(
hwnd
,
NULL
,
hrgnTemp
,
rdw_flags
);
DeleteObject
(
hrgnClip
);
}
...
...
@@ -169,6 +177,11 @@ INT WINAPI ScrollWindowEx( HWND hwnd, INT dx, INT dy,
RedrawWindow
(
hwnd
,
NULL
,
hrgnUpdate
,
rdw_flags
|
((
flags
&
SW_SCROLLCHILDREN
)
?
RDW_ALLCHILDREN
:
0
)
);
if
(
hrgnWinupd
)
{
CombineRgn
(
hrgnUpdate
,
hrgnUpdate
,
hrgnWinupd
,
RGN_OR
);
DeleteObject
(
hrgnWinupd
);
}
if
(
hwndCaret
)
{
SetCaretPos
(
caretrc
.
left
+
dx
,
caretrc
.
top
+
dy
);
ShowCaret
(
hwndCaret
);
...
...
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