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
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
Zsolt Vadász
wine
Commits
179e8deb
Commit
179e8deb
authored
25 years ago
by
Francis Beaudet
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Check if DC is busy before deleting it.
parent
99920819
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/dce.h
+1
-0
1 addition, 0 deletions
include/dce.h
objects/dc.c
+14
-1
14 additions, 1 deletion
objects/dc.c
windows/dce.c
+29
-0
29 additions, 0 deletions
windows/dce.c
with
44 additions
and
1 deletion
include/dce.h
+
1
−
0
View file @
179e8deb
...
...
@@ -53,5 +53,6 @@ extern void DCE_FreeWindowDCE( WND* );
extern
INT16
DCE_ExcludeRgn
(
HDC
,
WND
*
,
HRGN
);
extern
HRGN
DCE_GetVisRgn
(
HWND
,
WORD
,
HWND
,
WORD
);
extern
BOOL
DCE_InvalidateDCE
(
WND
*
,
const
RECT
*
);
extern
BOOL
DCE_IsDCBusy
(
HDC
hdc
);
#endif
/* __WINE_DCE_H */
This diff is collapsed.
Click to expand it.
objects/dc.c
+
14
−
1
View file @
179e8deb
...
...
@@ -657,7 +657,20 @@ BOOL16 WINAPI DeleteDC16( HDC16 hdc )
*/
BOOL
WINAPI
DeleteDC
(
HDC
hdc
)
{
DC
*
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hdc
,
DC_MAGIC
);
DC
*
dc
;
/*
* Windows will not let you delete a DC that is busy
* (between GetDC and ReleaseDC)
*/
if
(
DCE_IsDCBusy
(
hdc
))
{
WARN
(
dc
,
" Application trying to delete a busy DC
\n
"
);
return
TRUE
;
}
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hdc
,
DC_MAGIC
);
if
(
!
dc
)
return
FALSE
;
TRACE
(
dc
,
"%04x
\n
"
,
hdc
);
...
...
This diff is collapsed.
Click to expand it.
windows/dce.c
+
29
−
0
View file @
179e8deb
...
...
@@ -627,6 +627,35 @@ INT16 DCE_ExcludeRgn( HDC hDC, WND* wnd, HRGN hRgn )
return
ExtSelectClipRgn
(
hDC
,
hRgn
,
RGN_DIFF
);
}
/***********************************************************************
* DCE_IsDCBusy
*
* Utility function to determine if a particular DC is currently
* in a busy state..
*/
BOOL
DCE_IsDCBusy
(
HDC
hdc
)
{
DCE
*
dce
;
BOOL
isBusy
=
FALSE
;
WIN_LockWnds
();
dce
=
firstDCE
;
while
(
dce
&&
(
dce
->
hDC
!=
hdc
))
dce
=
dce
->
next
;
if
(
dce
)
{
if
(
dce
->
DCXflags
&
DCX_DCEBUSY
)
{
isBusy
=
TRUE
;
}
}
WIN_UnlockWnds
();
return
isBusy
;
}
/***********************************************************************
* GetDCEx16 (USER.359)
*/
...
...
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