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
fe7d81dc
Commit
fe7d81dc
authored
Jan 23, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Ignore rectangles with invalid coordinates when converting region data.
parent
038e308a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
8 deletions
+25
-8
graphics.c
dlls/winex11.drv/graphics.c
+25
-8
No files found.
dlls/winex11.drv/graphics.c
View file @
fe7d81dc
...
...
@@ -161,13 +161,24 @@ RGNDATA *X11DRV_GetRegionData( HRGN hrgn, HDC hdc_lptodp )
{
int
j
;
/* need to start from the end */
xrect
+=
data
->
rdh
.
nCount
;
for
(
j
=
data
->
rdh
.
nCount
-
1
;
j
>=
0
;
j
--
)
{
tmp
=
rect
[
j
];
xrect
[
j
].
x
=
max
(
min
(
tmp
.
left
,
SHRT_MAX
),
SHRT_MIN
);
xrect
[
j
].
y
=
max
(
min
(
tmp
.
top
,
SHRT_MAX
),
SHRT_MIN
);
xrect
[
j
].
width
=
max
(
min
(
tmp
.
right
-
xrect
[
j
].
x
,
USHRT_MAX
),
0
);
xrect
[
j
].
height
=
max
(
min
(
tmp
.
bottom
-
xrect
[
j
].
y
,
USHRT_MAX
),
0
);
if
(
tmp
.
left
>
SHRT_MAX
)
continue
;
if
(
tmp
.
top
>
SHRT_MAX
)
continue
;
if
(
tmp
.
right
<
SHRT_MIN
)
continue
;
if
(
tmp
.
bottom
<
SHRT_MIN
)
continue
;
xrect
--
;
xrect
->
x
=
max
(
min
(
tmp
.
left
,
SHRT_MAX
),
SHRT_MIN
);
xrect
->
y
=
max
(
min
(
tmp
.
top
,
SHRT_MAX
),
SHRT_MIN
);
xrect
->
width
=
max
(
min
(
tmp
.
right
,
SHRT_MAX
)
-
xrect
->
x
,
0
);
xrect
->
height
=
max
(
min
(
tmp
.
bottom
,
SHRT_MAX
)
-
xrect
->
y
,
0
);
}
if
(
xrect
>
(
XRectangle
*
)
data
->
Buffer
)
{
data
->
rdh
.
nCount
-=
xrect
-
(
XRectangle
*
)
data
->
Buffer
;
memmove
(
(
XRectangle
*
)
data
->
Buffer
,
xrect
,
data
->
rdh
.
nCount
*
sizeof
(
*
xrect
)
);
}
}
else
...
...
@@ -175,11 +186,17 @@ RGNDATA *X11DRV_GetRegionData( HRGN hrgn, HDC hdc_lptodp )
for
(
i
=
0
;
i
<
data
->
rdh
.
nCount
;
i
++
)
{
tmp
=
rect
[
i
];
xrect
[
i
].
x
=
max
(
min
(
tmp
.
left
,
SHRT_MAX
),
SHRT_MIN
);
xrect
[
i
].
y
=
max
(
min
(
tmp
.
top
,
SHRT_MAX
),
SHRT_MIN
);
xrect
[
i
].
width
=
max
(
min
(
tmp
.
right
-
xrect
[
i
].
x
,
USHRT_MAX
),
0
);
xrect
[
i
].
height
=
max
(
min
(
tmp
.
bottom
-
xrect
[
i
].
y
,
USHRT_MAX
),
0
);
if
(
tmp
.
left
>
SHRT_MAX
)
continue
;
if
(
tmp
.
top
>
SHRT_MAX
)
continue
;
if
(
tmp
.
right
<
SHRT_MIN
)
continue
;
if
(
tmp
.
bottom
<
SHRT_MIN
)
continue
;
xrect
->
x
=
max
(
min
(
tmp
.
left
,
SHRT_MAX
),
SHRT_MIN
);
xrect
->
y
=
max
(
min
(
tmp
.
top
,
SHRT_MAX
),
SHRT_MIN
);
xrect
->
width
=
max
(
min
(
tmp
.
right
,
SHRT_MAX
)
-
xrect
->
x
,
0
);
xrect
->
height
=
max
(
min
(
tmp
.
bottom
,
SHRT_MAX
)
-
xrect
->
y
,
0
);
xrect
++
;
}
data
->
rdh
.
nCount
=
xrect
-
(
XRectangle
*
)
data
->
Buffer
;
}
return
data
;
}
...
...
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