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
e6ea9ebb
Commit
e6ea9ebb
authored
May 08, 1999
by
Ulrich Weigand
Committed by
Alexandre Julliard
May 08, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for busy DCE moved to DCHook16().
parent
ef61c0b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
54 deletions
+28
-54
dce.h
include/dce.h
+0
-1
dc.c
objects/dc.c
+9
-14
dce.c
windows/dce.c
+19
-39
No files found.
include/dce.h
View file @
e6ea9ebb
...
...
@@ -53,6 +53,5 @@ 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 @
e6ea9ebb
...
...
@@ -657,24 +657,19 @@ BOOL16 WINAPI DeleteDC16( HDC16 hdc )
*/
BOOL
WINAPI
DeleteDC
(
HDC
hdc
)
{
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
);
DC
*
dc
=
(
DC
*
)
GDI_GetObjPtr
(
hdc
,
DC_MAGIC
);
if
(
!
dc
)
return
FALSE
;
TRACE
(
dc
,
"%04x
\n
"
,
hdc
);
/* Call hook procedure to check whether is it OK to delete this DC */
if
(
dc
->
hookProc
&&
!
(
dc
->
w
.
flags
&
(
DC_SAVED
|
DC_MEMORY
))
&&
dc
->
hookProc
(
hdc
,
DCHC_DELETEDC
,
dc
->
dwHookData
,
0
)
==
FALSE
)
{
GDI_HEAP_UNLOCK
(
hdc
);
return
FALSE
;
}
while
(
dc
->
saveLevel
)
{
DC
*
dcs
;
...
...
windows/dce.c
View file @
e6ea9ebb
...
...
@@ -17,6 +17,7 @@
* DCX_WINDOWPAINT - BeginPaint() is in effect
*/
#include <assert.h>
#include "desktop.h"
#include "options.h"
#include "dce.h"
...
...
@@ -627,34 +628,6 @@ 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)
...
...
@@ -988,21 +961,19 @@ INT WINAPI ReleaseDC(
*/
BOOL16
WINAPI
DCHook16
(
HDC16
hDC
,
WORD
code
,
DWORD
data
,
LPARAM
lParam
)
{
BOOL
retv
=
TRUE
;
HRGN
hVisRgn
;
DCE
*
dce
;
DCE
*
dce
=
(
DCE
*
)
data
;
DC
*
dc
;
WND
*
wndPtr
;
/* Grab the windows lock before doing anything else */
WIN_LockWnds
();
dce
=
firstDCE
;
TRACE
(
dc
,
"hDC = %04x, %i
\n
"
,
hDC
,
code
);
while
(
dce
&&
(
dce
->
hDC
!=
hDC
))
dce
=
dce
->
next
;
if
(
!
dce
)
return
0
;
assert
(
dce
->
hDC
==
hDC
);
if
(
!
dce
)
goto
END
;
/* Grab the windows lock before doing anything else */
WIN_LockWnds
();
switch
(
code
)
{
...
...
@@ -1050,16 +1021,25 @@ BOOL16 WINAPI DCHook16( HDC16 hDC, WORD code, DWORD data, LPARAM lParam )
WARN
(
dc
,
"DC is not in use!
\n
"
);
break
;
case
DCHC_DELETEDC
:
/* FIXME: ?? */
case
DCHC_DELETEDC
:
/*
* Windows will not let you delete a DC that is busy
* (between GetDC and ReleaseDC)
*/
if
(
dce
->
DCXflags
&
DCX_DCEBUSY
)
{
WARN
(
dc
,
"Application trying to delete a busy DC
\n
"
);
retv
=
FALSE
;
}
break
;
default:
FIXME
(
dc
,
"unknown code
\n
"
);
}
END:
WIN_UnlockWnds
();
/* Release the wnd lock */
return
0
;
return
retv
;
}
...
...
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