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
5215895a
Commit
5215895a
authored
Dec 14, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Support wrongly ordered rectangles in RectVisible.
parent
456b4c87
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
clipping.c
dlls/gdi32/clipping.c
+1
-0
clipping.c
dlls/gdi32/tests/clipping.c
+16
-0
No files found.
dlls/gdi32/clipping.c
View file @
5215895a
...
@@ -392,6 +392,7 @@ BOOL WINAPI RectVisible( HDC hdc, const RECT* rect )
...
@@ -392,6 +392,7 @@ BOOL WINAPI RectVisible( HDC hdc, const RECT* rect )
tmpRect
=
*
rect
;
tmpRect
=
*
rect
;
LPtoDP
(
hdc
,
(
POINT
*
)
&
tmpRect
,
2
);
LPtoDP
(
hdc
,
(
POINT
*
)
&
tmpRect
,
2
);
order_rect
(
&
tmpRect
);
update_dc
(
dc
);
update_dc
(
dc
);
ret
=
(
!
get_dc_device_rect
(
dc
,
&
visrect
)
||
intersect_rect
(
&
visrect
,
&
visrect
,
&
tmpRect
));
ret
=
(
!
get_dc_device_rect
(
dc
,
&
visrect
)
||
intersect_rect
(
&
visrect
,
&
visrect
,
&
tmpRect
));
...
...
dlls/gdi32/tests/clipping.c
View file @
5215895a
...
@@ -401,6 +401,14 @@ static void test_memory_dc_clipping(void)
...
@@ -401,6 +401,14 @@ static void test_memory_dc_clipping(void)
ok
(
rc
.
left
==
0
&&
rc
.
top
==
0
&&
rc
.
right
==
100
&&
rc
.
bottom
==
100
,
ok
(
rc
.
left
==
0
&&
rc
.
top
==
0
&&
rc
.
right
==
100
&&
rc
.
bottom
==
100
,
"expected 0,0-100,100, got %d,%d-%d,%d
\n
"
,
rc
.
left
,
rc
.
top
,
rc
.
right
,
rc
.
bottom
);
"expected 0,0-100,100, got %d,%d-%d,%d
\n
"
,
rc
.
left
,
rc
.
top
,
rc
.
right
,
rc
.
bottom
);
SetRect
(
&
rc
,
10
,
10
,
20
,
20
);
ret
=
RectVisible
(
hdc
,
&
rc
);
ok
(
ret
,
"RectVisible failed for %d,%d-%d,%d
\n
"
,
rc
.
left
,
rc
.
top
,
rc
.
right
,
rc
.
bottom
);
SetRect
(
&
rc
,
20
,
20
,
10
,
10
);
ret
=
RectVisible
(
hdc
,
&
rc
);
ok
(
ret
,
"RectVisible failed for %d,%d-%d,%d
\n
"
,
rc
.
left
,
rc
.
top
,
rc
.
right
,
rc
.
bottom
);
DeleteDC
(
hdc
);
DeleteDC
(
hdc
);
DeleteObject
(
hrgn
);
DeleteObject
(
hrgn
);
DeleteObject
(
hrgn_empty
);
DeleteObject
(
hrgn_empty
);
...
@@ -446,6 +454,14 @@ static void test_window_dc_clipping(void)
...
@@ -446,6 +454,14 @@ static void test_window_dc_clipping(void)
"expected 0,0-%d,%d, got %d,%d-%d,%d
\n
"
,
screen_width
,
screen_height
,
"expected 0,0-%d,%d, got %d,%d-%d,%d
\n
"
,
screen_width
,
screen_height
,
rc
.
left
,
rc
.
top
,
rc
.
right
,
rc
.
bottom
);
rc
.
left
,
rc
.
top
,
rc
.
right
,
rc
.
bottom
);
SetRect
(
&
rc
,
10
,
10
,
20
,
20
);
ret
=
RectVisible
(
hdc
,
&
rc
);
ok
(
ret
,
"RectVisible failed for %d,%d-%d,%d
\n
"
,
rc
.
left
,
rc
.
top
,
rc
.
right
,
rc
.
bottom
);
SetRect
(
&
rc
,
20
,
20
,
10
,
10
);
ret
=
RectVisible
(
hdc
,
&
rc
);
ok
(
ret
,
"RectVisible failed for %d,%d-%d,%d
\n
"
,
rc
.
left
,
rc
.
top
,
rc
.
right
,
rc
.
bottom
);
ret
=
ExtSelectClipRgn
(
hdc
,
0
,
RGN_COPY
);
ret
=
ExtSelectClipRgn
(
hdc
,
0
,
RGN_COPY
);
ok
(
ret
==
SIMPLEREGION
||
(
ret
==
COMPLEXREGION
&&
GetSystemMetrics
(
SM_CMONITORS
)
>
1
),
ok
(
ret
==
SIMPLEREGION
||
(
ret
==
COMPLEXREGION
&&
GetSystemMetrics
(
SM_CMONITORS
)
>
1
),
"expected SIMPLEREGION, got %d
\n
"
,
ret
);
"expected SIMPLEREGION, got %d
\n
"
,
ret
);
...
...
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