Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0805b0d5
Commit
0805b0d5
authored
Jan 26, 2017
by
Huw Davies
Committed by
Alexandre Julliard
Jan 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add the ability to disable a DC.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1e8f554e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
dc.c
dlls/gdi32/dc.c
+10
-0
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-0
gdi_driver.h
include/wine/gdi_driver.h
+2
-0
No files found.
dlls/gdi32/dc.c
View file @
0805b0d5
...
...
@@ -203,6 +203,11 @@ DC *get_dc_ptr( HDC hdc )
{
DC
*
dc
=
get_dc_obj
(
hdc
);
if
(
!
dc
)
return
NULL
;
if
(
dc
->
disabled
)
{
GDI_ReleaseObj
(
hdc
);
return
NULL
;
}
if
(
!
InterlockedCompareExchange
(
&
dc
->
refcount
,
1
,
0
))
{
...
...
@@ -1269,6 +1274,11 @@ WORD WINAPI SetHookFlags( HDC hdc, WORD flags )
else
if
(
flags
&
DCHF_VALIDATEVISRGN
||
!
flags
)
ret
=
InterlockedExchange
(
&
dc
->
dirty
,
0
);
if
(
flags
&
DCHF_DISABLEDC
)
ret
=
InterlockedExchange
(
&
dc
->
disabled
,
1
);
else
if
(
flags
&
DCHF_ENABLEDC
)
ret
=
InterlockedExchange
(
&
dc
->
disabled
,
0
);
GDI_ReleaseObj
(
hdc
);
if
(
flags
&
DCHF_RESETDC
)
ret
=
reset_dc_state
(
hdc
);
...
...
dlls/gdi32/gdi_private.h
View file @
0805b0d5
...
...
@@ -65,6 +65,7 @@ typedef struct tagDC
DWORD
thread
;
/* thread owning the DC */
LONG
refcount
;
/* thread refcount */
LONG
dirty
;
/* dirty flag */
LONG
disabled
;
/* get_dc_ptr() will return NULL. Controlled by DCHF_(DISABLE|ENABLE)DC */
INT
saveLevel
;
struct
tagDC
*
saved_dc
;
DWORD_PTR
dwHookData
;
...
...
include/wine/gdi_driver.h
View file @
0805b0d5
...
...
@@ -266,6 +266,8 @@ static inline ULONG window_surface_release( struct window_surface *surface )
#define DCHF_INVALIDATEVISRGN 0x0001
#define DCHF_VALIDATEVISRGN 0x0002
#define DCHF_RESETDC 0x0004
/* Wine extension */
#define DCHF_DISABLEDC 0x0008
/* Wine extension */
#define DCHF_ENABLEDC 0x0010
/* Wine extension */
typedef
BOOL
(
CALLBACK
*
DCHOOKPROC
)(
HDC
,
WORD
,
DWORD_PTR
,
LPARAM
);
...
...
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