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
c2bbdc4b
Commit
c2bbdc4b
authored
Apr 04, 2013
by
Ken Thomases
Committed by
Alexandre Julliard
Apr 05, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Clip surface drawn region to new visible rect on window resize.
This prevents stale drawing from being revealed if the window later grows.
parent
f37153ac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
macdrv.h
dlls/winemac.drv/macdrv.h
+1
-0
surface.c
dlls/winemac.drv/surface.c
+32
-0
window.c
dlls/winemac.drv/window.c
+1
-0
No files found.
dlls/winemac.drv/macdrv.h
View file @
c2bbdc4b
...
...
@@ -141,6 +141,7 @@ extern struct window_surface *create_surface(macdrv_window window, const RECT *r
struct
window_surface
*
old_surface
,
BOOL
use_alpha
)
DECLSPEC_HIDDEN
;
extern
void
set_window_surface
(
macdrv_window
window
,
struct
window_surface
*
window_surface
)
DECLSPEC_HIDDEN
;
extern
void
set_surface_use_alpha
(
struct
window_surface
*
window_surface
,
BOOL
use_alpha
)
DECLSPEC_HIDDEN
;
extern
void
surface_clip_to_visible_rect
(
struct
window_surface
*
window_surface
,
const
RECT
*
visible_rect
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_handle_event
(
const
macdrv_event
*
event
)
DECLSPEC_HIDDEN
;
...
...
dlls/winemac.drv/surface.c
View file @
c2bbdc4b
...
...
@@ -410,3 +410,35 @@ CGImageRef create_surface_image(void *window_surface, CGRect *rect, int copy_dat
return
cgimage
;
}
/***********************************************************************
* surface_clip_to_visible_rect
*
* Intersect the accumulated drawn region with a new visible rect,
* effectively discarding stale drawing in the surface slack area.
*/
void
surface_clip_to_visible_rect
(
struct
window_surface
*
window_surface
,
const
RECT
*
visible_rect
)
{
struct
macdrv_window_surface
*
surface
=
get_mac_surface
(
window_surface
);
window_surface
->
funcs
->
lock
(
window_surface
);
if
(
surface
->
drawn
)
{
RECT
rect
;
HRGN
region
;
rect
=
*
visible_rect
;
OffsetRect
(
&
rect
,
-
rect
.
left
,
-
rect
.
top
);
if
((
region
=
CreateRectRgnIndirect
(
&
rect
)))
{
CombineRgn
(
surface
->
drawn
,
surface
->
drawn
,
region
,
RGN_AND
);
DeleteObject
(
region
);
update_blit_data
(
surface
);
}
}
window_surface
->
funcs
->
unlock
(
window_surface
);
}
dlls/winemac.drv/window.c
View file @
c2bbdc4b
...
...
@@ -1284,6 +1284,7 @@ void CDECL macdrv_WindowPosChanging(HWND hwnd, HWND insert_after, UINT swp_flags
if
(
!
memcmp
(
&
data
->
surface
->
rect
,
&
surface_rect
,
sizeof
(
surface_rect
)))
{
/* existing surface is good enough */
surface_clip_to_visible_rect
(
data
->
surface
,
visible_rect
);
window_surface_add_ref
(
data
->
surface
);
*
surface
=
data
->
surface
;
goto
done
;
...
...
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