Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Li Wenzhe
wine
Commits
ff0149e7
Commit
ff0149e7
authored
25 years ago
by
Noomen Hamza
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Avoid painting destroyed windows.
parent
a099a555
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
windows/painting.c
+20
-1
20 additions, 1 deletion
windows/painting.c
with
20 additions
and
1 deletion
windows/painting.c
+
20
−
1
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment