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
179e8deb
Commit
179e8deb
authored
May 04, 1999
by
Francis Beaudet
Committed by
Alexandre Julliard
May 04, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check if DC is busy before deleting it.
parent
99920819
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
1 deletion
+44
-1
dce.h
include/dce.h
+1
-0
dc.c
objects/dc.c
+14
-1
dce.c
windows/dce.c
+29
-0
No files found.
include/dce.h
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 */
objects/dc.c
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
);
...
...
windows/dce.c
View file @
179e8deb
...
...
@@ -628,6 +628,35 @@ INT16 DCE_ExcludeRgn( HDC hDC, WND* wnd, HRGN hRgn )
}
/***********************************************************************
* 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)
*/
HDC16
WINAPI
GetDCEx16
(
HWND16
hwnd
,
HRGN16
hrgnClip
,
DWORD
flags
)
...
...
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