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
924fad9d
Commit
924fad9d
authored
Jun 18, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: ExtSelectClipRgn(hdc, 0, RGN_DIFF) is supposed to fail.
parent
9974a3e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
4 deletions
+47
-4
clipping.c
dlls/gdi32/clipping.c
+11
-4
clipping.c
dlls/gdi32/tests/clipping.c
+36
-0
No files found.
dlls/gdi32/clipping.c
View file @
924fad9d
...
...
@@ -148,14 +148,21 @@ INT nulldrv_ExtSelectClipRgn( PHYSDEV dev, HRGN rgn, INT mode )
if
(
!
rgn
)
{
if
(
mode
!=
RGN_COPY
)
switch
(
mode
)
{
case
RGN_COPY
:
if
(
dc
->
hClipRgn
)
DeleteObject
(
dc
->
hClipRgn
);
dc
->
hClipRgn
=
0
;
ret
=
SIMPLEREGION
;
break
;
case
RGN_DIFF
:
return
ERROR
;
default:
FIXME
(
"Unimplemented: hrgn NULL in mode: %d
\n
"
,
mode
);
return
ERROR
;
}
if
(
dc
->
hClipRgn
)
DeleteObject
(
dc
->
hClipRgn
);
dc
->
hClipRgn
=
0
;
ret
=
SIMPLEREGION
;
}
else
{
...
...
dlls/gdi32/tests/clipping.c
View file @
924fad9d
...
...
@@ -2,6 +2,7 @@
* Unit test suite for clipping
*
* Copyright 2005 Huw Davies
* Copyright 2008,2011,2013 Dmitry Timoshkov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -388,6 +389,12 @@ static void test_memory_dc_clipping(void)
ret
=
GetClipRgn
(
hdc
,
hrgn
);
ok
(
ret
==
0
,
"expected 0, got %d
\n
"
,
ret
);
ret
=
ExtSelectClipRgn
(
hdc
,
0
,
RGN_DIFF
);
ok
(
ret
==
0
,
"expected 0, got %d
\n
"
,
ret
);
ret
=
GetClipRgn
(
hdc
,
hrgn
);
ok
(
ret
==
0
,
"expected 0, got %d
\n
"
,
ret
);
SelectObject
(
hdc
,
hbmp
);
ret
=
ExtSelectClipRgn
(
hdc
,
hrgn_empty
,
RGN_DIFF
);
...
...
@@ -409,6 +416,17 @@ static void test_memory_dc_clipping(void)
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_DIFF
);
ok
(
ret
==
0
,
"expected 0, got %d
\n
"
,
ret
);
ret
=
GetClipRgn
(
hdc
,
hrgn
);
ok
(
ret
==
1
,
"expected 1, got %d
\n
"
,
ret
);
ret
=
GetRgnBox
(
hrgn
,
&
rc
);
ok
(
ret
==
SIMPLEREGION
,
"expected SIMPLEREGION, got %d
\n
"
,
ret
);
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
);
DeleteDC
(
hdc
);
DeleteObject
(
hrgn
);
DeleteObject
(
hrgn_empty
);
...
...
@@ -441,6 +459,12 @@ static void test_window_dc_clipping(void)
ret
=
GetClipRgn
(
hdc
,
hrgn
);
ok
(
ret
==
0
,
"expected 0, got %d
\n
"
,
ret
);
ret
=
ExtSelectClipRgn
(
hdc
,
0
,
RGN_DIFF
);
ok
(
ret
==
0
,
"expected 0, got %d
\n
"
,
ret
);
ret
=
GetClipRgn
(
hdc
,
hrgn
);
ok
(
ret
==
0
,
"expected 0, got %d
\n
"
,
ret
);
ret
=
ExtSelectClipRgn
(
hdc
,
hrgn_empty
,
RGN_DIFF
);
ok
(
ret
==
SIMPLEREGION
||
(
ret
==
COMPLEXREGION
&&
GetSystemMetrics
(
SM_CMONITORS
)
>
1
),
"expected SIMPLEREGION, got %d
\n
"
,
ret
);
...
...
@@ -462,6 +486,18 @@ static void test_window_dc_clipping(void)
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_DIFF
);
ok
(
ret
==
0
,
"expected 0, got %d
\n
"
,
ret
);
ret
=
GetClipRgn
(
hdc
,
hrgn
);
ok
(
ret
==
1
,
"expected 1, got %d
\n
"
,
ret
);
ret
=
GetRgnBox
(
hrgn
,
&
rc
);
ok
(
ret
==
SIMPLEREGION
,
"expected SIMPLEREGION, got %d
\n
"
,
ret
);
ok
(
rc
.
left
==
0
&&
rc
.
top
==
0
&&
rc
.
right
==
screen_width
&&
rc
.
bottom
==
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
);
ret
=
ExtSelectClipRgn
(
hdc
,
0
,
RGN_COPY
);
ok
(
ret
==
SIMPLEREGION
||
(
ret
==
COMPLEXREGION
&&
GetSystemMetrics
(
SM_CMONITORS
)
>
1
),
"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