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
ff0149e7
Commit
ff0149e7
authored
Jun 12, 1999
by
Noomen Hamza
Committed by
Alexandre Julliard
Jun 12, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid painting destroyed windows.
parent
a099a555
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
painting.c
windows/painting.c
+20
-1
No files found.
windows/painting.c
View file @
ff0149e7
...
...
@@ -152,6 +152,15 @@ copyrgn:
{
SendMessageA
(
wnd
->
hwndSelf
,
WM_NCPAINT
,
hClip
,
0L
);
if
(
(
hClip
>
1
)
&&
(
hClip
!=
hRgn
)
&&
(
hClip
!=
hrgnRet
)
)
DeleteObject
(
hClip
);
/*
* Since all Window locks are suspended while processing the WM_NCPAINT
* we want to make sure the window still exists before continuing.
*/
if
(
!
IsWindow
(
wnd
->
hwndSelf
))
{
DeleteObject
(
hrgnRet
);
hrgnRet
=
0
;
}
}
TRACE_
(
nonclient
)(
"returning %04x (hClip = %04x, hrgnUpdate = %04x)
\n
"
,
hrgnRet
,
hClip
,
wnd
->
hrgnUpdate
);
...
...
@@ -177,6 +186,16 @@ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
/* send WM_NCPAINT and make sure hrgnUpdate is a valid rgn handle */
WIN_UpdateNCRgn
(
wndPtr
,
0
,
UNC_UPDATE
);
/*
* Make sure the window is still a window. All window locks are suspended
* when the WM_NCPAINT is sent.
*/
if
(
!
IsWindow
(
wndPtr
->
hwndSelf
))
{
WIN_ReleaseWndPtr
(
wndPtr
);
return
0
;
}
if
(
((
hrgnUpdate
=
wndPtr
->
hrgnUpdate
)
!=
0
)
||
(
wndPtr
->
flags
&
WIN_INTERNAL_PAINT
))
QUEUE_DecPaintCount
(
wndPtr
->
hmemTaskQ
);
...
...
@@ -558,7 +577,7 @@ static HRGN RDW_Paint( WND* wndPtr, HRGN hrgn, UINT flags, UINT ex )
}
else
if
((
flags
&
RDW_ERASENOW
)
||
(
ex
&
RDW_EX_TOPFRAME
))
{
UINT
dcx
=
DCX_INTERSECTRGN
|
DCX_USESTYLE
|
DCX_KEEPCLIPRGN
|
DCX_WINDOWPAINT
;
UINT
dcx
=
DCX_INTERSECTRGN
|
DCX_USESTYLE
|
DCX_KEEPCLIPRGN
|
DCX_WINDOWPAINT
|
DCX_CACHE
;
HRGN
hrgnRet
=
WIN_UpdateNCRgn
(
wndPtr
,
hrgn
,
UNC_REGION
|
UNC_CHECK
|
((
ex
&
RDW_EX_TOPFRAME
)
?
UNC_ENTIRE
:
0
)
);
if
(
hrgnRet
)
...
...
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