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
aa907299
Commit
aa907299
authored
Apr 17, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Apr 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Use inline intersect_rect helper instead of IntersectRect.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ace09cf3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
7 deletions
+16
-7
bitblt.c
dlls/winex11.drv/bitblt.c
+1
-1
display.c
dlls/winex11.drv/display.c
+2
-2
init.c
dlls/winex11.drv/init.c
+1
-1
settings.c
dlls/winex11.drv/settings.c
+1
-1
window.c
dlls/winex11.drv/window.c
+2
-2
x11drv.h
dlls/winex11.drv/x11drv.h
+9
-0
No files found.
dlls/winex11.drv/bitblt.c
View file @
aa907299
...
...
@@ -1912,7 +1912,7 @@ static void x11drv_surface_flush( struct window_surface *window_surface )
coords
.
width
=
surface
->
header
.
rect
.
right
-
surface
->
header
.
rect
.
left
;
coords
.
height
=
surface
->
header
.
rect
.
bottom
-
surface
->
header
.
rect
.
top
;
SetRect
(
&
coords
.
visrect
,
0
,
0
,
coords
.
width
,
coords
.
height
);
if
(
IntersectR
ect
(
&
coords
.
visrect
,
&
coords
.
visrect
,
&
surface
->
bounds
))
if
(
intersect_r
ect
(
&
coords
.
visrect
,
&
coords
.
visrect
,
&
surface
->
bounds
))
{
TRACE
(
"flushing %p %dx%d bounds %s bits %p
\n
"
,
surface
,
coords
.
width
,
coords
.
height
,
...
...
dlls/winex11.drv/display.c
View file @
aa907299
...
...
@@ -124,7 +124,7 @@ RECT get_work_area(const RECT *monitor_rect)
work_rect
.
right
=
work_rect
.
left
+
work_area
[
i
*
4
+
2
];
work_rect
.
bottom
=
work_rect
.
top
+
work_area
[
i
*
4
+
3
];
if
(
IntersectRect
(
&
work_rect
,
&
work_rect
,
monitor_rect
))
if
(
intersect_rect
(
&
work_rect
,
&
work_rect
,
monitor_rect
))
{
TRACE
(
"work_rect:%s.
\n
"
,
wine_dbgstr_rect
(
&
work_rect
));
XFree
(
work_area
);
...
...
@@ -146,7 +146,7 @@ RECT get_work_area(const RECT *monitor_rect)
SetRect
(
&
work_rect
,
work_area
[
0
],
work_area
[
1
],
work_area
[
0
]
+
work_area
[
2
],
work_area
[
1
]
+
work_area
[
3
]);
if
(
IntersectRect
(
&
work_rect
,
&
work_rect
,
monitor_rect
))
if
(
intersect_rect
(
&
work_rect
,
&
work_rect
,
monitor_rect
))
{
TRACE
(
"work_rect:%s.
\n
"
,
wine_dbgstr_rect
(
&
work_rect
));
XFree
(
work_area
);
...
...
dlls/winex11.drv/init.c
View file @
aa907299
...
...
@@ -147,7 +147,7 @@ void add_device_bounds( X11DRV_PDEVICE *dev, const RECT *rect )
if
(
!
dev
->
bounds
)
return
;
if
(
dev
->
region
&&
NtGdiGetRgnBox
(
dev
->
region
,
&
rc
))
{
if
(
IntersectR
ect
(
&
rc
,
&
rc
,
rect
))
add_bounds_rect
(
dev
->
bounds
,
&
rc
);
if
(
intersect_r
ect
(
&
rc
,
&
rc
,
rect
))
add_bounds_rect
(
dev
->
bounds
,
&
rc
);
}
else
add_bounds_rect
(
dev
->
bounds
,
rect
);
}
...
...
dlls/winex11.drv/settings.c
View file @
aa907299
...
...
@@ -709,7 +709,7 @@ static BOOL overlap_placed_displays(const RECT *rect, const struct x11drv_displa
for
(
display_idx
=
0
;
display_idx
<
display_count
;
++
display_idx
)
{
if
(
displays
[
display_idx
].
placed
&&
IntersectR
ect
(
&
intersect
,
&
displays
[
display_idx
].
new_rect
,
rect
))
intersect_r
ect
(
&
intersect
,
&
displays
[
display_idx
].
new_rect
,
rect
))
return
TRUE
;
}
return
FALSE
;
...
...
dlls/winex11.drv/window.c
View file @
aa907299
...
...
@@ -2309,7 +2309,7 @@ static inline BOOL get_surface_rect( const RECT *visible_rect, RECT *surface_rec
{
*
surface_rect
=
NtUserGetVirtualScreenRect
();
if
(
!
IntersectR
ect
(
surface_rect
,
surface_rect
,
visible_rect
))
return
FALSE
;
if
(
!
intersect_r
ect
(
surface_rect
,
surface_rect
,
visible_rect
))
return
FALSE
;
OffsetRect
(
surface_rect
,
-
visible_rect
->
left
,
-
visible_rect
->
top
);
surface_rect
->
left
&=
~
31
;
surface_rect
->
top
&=
~
31
;
...
...
@@ -2761,7 +2761,7 @@ BOOL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
if
(
info
->
prcDirty
)
{
IntersectR
ect
(
&
rect
,
&
rect
,
info
->
prcDirty
);
intersect_r
ect
(
&
rect
,
&
rect
,
info
->
prcDirty
);
memcpy
(
src_bits
,
dst_bits
,
bmi
->
bmiHeader
.
biSizeImage
);
NtGdiPatBlt
(
hdc
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
,
BLACKNESS
);
}
...
...
dlls/winex11.drv/x11drv.h
View file @
aa907299
...
...
@@ -885,6 +885,15 @@ static inline HWND get_active_window(void)
return
NtUserGetGUIThreadInfo
(
GetCurrentThreadId
(),
&
info
)
?
info
.
hwndActive
:
0
;
}
static
inline
BOOL
intersect_rect
(
RECT
*
dst
,
const
RECT
*
src1
,
const
RECT
*
src2
)
{
dst
->
left
=
max
(
src1
->
left
,
src2
->
left
);
dst
->
top
=
max
(
src1
->
top
,
src2
->
top
);
dst
->
right
=
min
(
src1
->
right
,
src2
->
right
);
dst
->
bottom
=
min
(
src1
->
bottom
,
src2
->
bottom
);
return
!
IsRectEmpty
(
dst
);
}
/* registry helpers */
extern
HKEY
open_hkcu_key
(
const
char
*
name
)
DECLSPEC_HIDDEN
;
...
...
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