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
3df678a5
Commit
3df678a5
authored
Dec 19, 2005
by
Rein Klazes
Committed by
Alexandre Julliard
Dec 19, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x11drv: Do not use the scroll rectangle for clipping in ScrollDC.
With a conformance test.
parent
7458d741
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
24 deletions
+37
-24
win.c
dlls/user/tests/win.c
+16
-1
scroll.c
dlls/x11drv/scroll.c
+21
-23
No files found.
dlls/user/tests/win.c
View file @
3df678a5
...
...
@@ -2954,7 +2954,7 @@ static void test_scrolldc( HWND parent)
ScrollDC
(
hdc
,
5
,
-
20
,
&
rc
,
&
cliprc
,
hrgn
,
&
rcu
);
colr
=
GetPixel
(
hdc
,
(
rc
.
left
+
rc
.
right
)
/
2
,
(
rc
.
top
+
rc
.
bottom
)
/
2
-
1
);
ok
(
colr
==
0
,
"pixel should be black, color is %08lx
\n
"
,
colr
);
/* test with NULL clip rect */
ScrollDC
(
hdc
,
20
,
-
20
,
&
rc
,
NULL
,
hrgn
,
&
rcu
);
/*FillRgn(hdc, hrgn, GetStockObject(WHITE_BRUSH));*/
trace
(
"update rect: %ld,%ld - %ld,%ld
\n
"
,
...
...
@@ -2969,6 +2969,21 @@ static void test_scrolldc( HWND parent)
CombineRgn
(
exprgn
,
exprgn
,
tmprgn
,
RGN_OR
);
if
(
winetest_debug
>
0
)
dump_region
(
exprgn
);
ok
(
EqualRgn
(
exprgn
,
hrgn
),
"wrong update region
\n
"
);
/* test clip rect > scroll rect */
FillRect
(
hdc
,
&
rc
,
GetStockObject
(
WHITE_BRUSH
));
rc2
=
rc
;
InflateRect
(
&
rc2
,
-
(
rc
.
right
-
rc
.
left
)
/
4
,
-
(
rc
.
bottom
-
rc
.
top
)
/
4
);
FillRect
(
hdc
,
&
rc2
,
GetStockObject
(
BLACK_BRUSH
));
ScrollDC
(
hdc
,
10
,
10
,
&
rc2
,
&
rc
,
hrgn
,
&
rcu
);
SetRectRgn
(
exprgn
,
25
,
25
,
75
,
35
);
SetRectRgn
(
tmprgn
,
25
,
35
,
35
,
75
);
CombineRgn
(
exprgn
,
exprgn
,
tmprgn
,
RGN_OR
);
ok
(
EqualRgn
(
exprgn
,
hrgn
),
"wrong update region
\n
"
);
colr
=
GetPixel
(
hdc
,
80
,
80
);
ok
(
colr
==
0
,
"pixel should be black, color is %08lx
\n
"
,
colr
);
trace
(
"update rect: %ld,%ld - %ld,%ld
\n
"
,
rcu
.
left
,
rcu
.
top
,
rcu
.
right
,
rcu
.
bottom
);
if
(
winetest_debug
>
0
)
dump_region
(
hrgn
);
/* clean up */
DeleteObject
(
hrgn
);
...
...
dlls/x11drv/scroll.c
View file @
3df678a5
...
...
@@ -91,34 +91,21 @@ BOOL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *lprcScroll,
}
else
CombineRgn
(
visrgn
,
visrgn
,
clipRgn
,
RGN_AND
);
/* only those pixels in the scroll rectangle that remain in the clipping
* rect are scrolled. So first combine Scroll and Clipping rectangles,
* if available */
if
(
lprcScroll
)
{
if
(
lprcClip
)
IntersectRect
(
&
rcClip
,
lprcClip
,
lprcScroll
);
else
rcClip
=
*
lprcScroll
;
}
* rect are scrolled. */
if
(
lprcClip
)
rcClip
=
*
lprcClip
;
else
{
if
(
lprcClip
)
rcClip
=
*
lprcClip
;
else
GetClipBox
(
hdc
,
&
rcClip
);
}
/* Then clip again to get the source rectangle that will remain in the
* clipping rect */
GetClipBox
(
hdc
,
&
rcClip
);
rcSrc
=
rcClip
;
if
(
lprcClip
)
{
OffsetRect
(
&
rcSrc
,
-
dx
,
-
dy
);
IntersectRect
(
&
rcSrc
,
&
rcSrc
,
&
rcClip
);
}
OffsetRect
(
&
rcClip
,
-
dx
,
-
dy
);
IntersectRect
(
&
rcSrc
,
&
rcSrc
,
&
rcClip
);
/* if an scroll rectangle is specified, only the pixels within that
* rectangle are scrolled */
if
(
lprcScroll
)
IntersectRect
(
&
rcSrc
,
&
rcSrc
,
lprcScroll
);
/* now convert to device coordinates */
LPtoDP
(
hdc
,
(
LPPOINT
)
&
rcSrc
,
2
);
TRACE
(
"source rect: %s
\n
"
,
wine_dbgstr_rect
(
&
rcSrc
));
/* also dx and dy */
SetRect
(
&
offset
,
0
,
0
,
dx
,
dy
);
LPtoDP
(
hdc
,
(
LPPOINT
)
&
offset
,
2
);
...
...
@@ -160,6 +147,17 @@ BOOL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *lprcScroll,
code
=
X11DRV_END_EXPOSURES
;
ExtEscape
(
hdc
,
X11DRV_ESCAPE
,
sizeof
(
code
),
(
LPSTR
)
&
code
,
sizeof
(
ExpRgn
),
(
LPSTR
)
&
ExpRgn
);
/* Intersect clip and scroll rectangles, allowing NULL values */
if
(
lprcScroll
)
if
(
lprcClip
)
IntersectRect
(
&
rcClip
,
lprcClip
,
lprcScroll
);
else
rcClip
=
*
lprcScroll
;
else
if
(
lprcClip
)
rcClip
=
*
lprcClip
;
else
GetClipBox
(
hdc
,
&
rcClip
);
/* Convert the combined clip rectangle to device coordinates */
LPtoDP
(
hdc
,
(
LPPOINT
)
&
rcClip
,
2
);
if
(
hrgn
)
...
...
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