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
3bd142e9
Commit
3bd142e9
authored
Feb 18, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Use GetDCHook to retrieve the dce pointer instead of storing it in the physdev structure.
parent
50dea381
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
34 deletions
+5
-34
dce.c
dlls/winex11.drv/dce.c
+2
-18
init.c
dlls/winex11.drv/init.c
+1
-12
x11drv.h
dlls/winex11.drv/x11drv.h
+2
-4
No files found.
dlls/winex11.drv/dce.c
View file @
3bd142e9
...
...
@@ -222,7 +222,6 @@ static void delete_clip_rgn( struct dce *dce )
*/
static
struct
dce
*
alloc_cache_dce
(
void
)
{
struct
x11drv_escape_set_dce
escape
;
struct
dce
*
dce
;
if
(
!
(
dce
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
dce
)
)))
return
NULL
;
...
...
@@ -245,11 +244,6 @@ static struct dce *alloc_cache_dce(void)
EnterCriticalSection
(
&
dce_section
);
list_add_head
(
&
dce_list
,
&
dce
->
entry
);
LeaveCriticalSection
(
&
dce_section
);
escape
.
code
=
X11DRV_SET_DCE
;
escape
.
dce
=
dce
;
ExtEscape
(
dce
->
hdc
,
X11DRV_ESCAPE
,
sizeof
(
escape
),
(
LPCSTR
)
&
escape
,
0
,
NULL
);
return
dce
;
}
...
...
@@ -261,7 +255,6 @@ static struct dce *alloc_cache_dce(void)
*/
void
alloc_window_dce
(
struct
x11drv_win_data
*
data
)
{
struct
x11drv_escape_set_dce
escape
;
struct
dce
*
dce
;
void
*
class_ptr
=
NULL
;
LONG
style
=
GetClassLongW
(
data
->
hwnd
,
GCL_STYLE
);
...
...
@@ -320,10 +313,6 @@ void alloc_window_dce( struct x11drv_win_data *data )
list_add_tail
(
&
dce_list
,
&
dce
->
entry
);
LeaveCriticalSection
(
&
dce_section
);
data
->
dce
=
dce
;
escape
.
code
=
X11DRV_SET_DCE
;
escape
.
dce
=
dce
;
ExtEscape
(
dce
->
hdc
,
X11DRV_ESCAPE
,
sizeof
(
escape
),
(
LPCSTR
)
&
escape
,
0
,
NULL
);
}
...
...
@@ -579,15 +568,13 @@ HDC X11DRV_GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
*/
INT
X11DRV_ReleaseDC
(
HWND
hwnd
,
HDC
hdc
,
BOOL
end_paint
)
{
enum
x11drv_escape_codes
escape
=
X11DRV_GET_DCE
;
struct
dce
*
dce
;
BOOL
ret
=
FALSE
;
TRACE
(
"%p %p
\n
"
,
hwnd
,
hdc
);
EnterCriticalSection
(
&
dce_section
);
if
(
!
ExtEscape
(
hdc
,
X11DRV_ESCAPE
,
sizeof
(
escape
),
(
LPCSTR
)
&
escape
,
sizeof
(
dce
),
(
LPSTR
)
&
dce
))
dce
=
NULL
;
dce
=
(
struct
dce
*
)
GetDCHook
(
hdc
,
NULL
);
if
(
dce
&&
dce
->
count
)
{
if
(
end_paint
||
(
dce
->
flags
&
DCX_CACHE
))
delete_clip_rgn
(
dce
);
...
...
@@ -653,14 +640,11 @@ static BOOL CALLBACK dc_hook( HDC hDC, WORD code, DWORD_PTR data, LPARAM lParam
*/
HWND
X11DRV_WindowFromDC
(
HDC
hdc
)
{
enum
x11drv_escape_codes
escape
=
X11DRV_GET_DCE
;
struct
dce
*
dce
;
HWND
hwnd
=
0
;
EnterCriticalSection
(
&
dce_section
);
if
(
!
ExtEscape
(
hdc
,
X11DRV_ESCAPE
,
sizeof
(
escape
),
(
LPCSTR
)
&
escape
,
sizeof
(
dce
),
(
LPSTR
)
&
dce
))
dce
=
NULL
;
if
(
dce
)
hwnd
=
dce
->
hwnd
;
if
((
dce
=
(
struct
dce
*
)
GetDCHook
(
hdc
,
NULL
)))
hwnd
=
dce
->
hwnd
;
LeaveCriticalSection
(
&
dce_section
);
return
hwnd
;
}
dlls/winex11.drv/init.c
View file @
3bd142e9
...
...
@@ -408,19 +408,8 @@ INT X11DRV_ExtEscape( X11DRV_PDEVICE *physDev, INT escape, INT in_count, LPCVOID
}
break
;
case
X11DRV_GET_DCE
:
if
(
out_count
>=
sizeof
(
struct
dce
*
))
{
*
(
struct
dce
**
)
out_data
=
physDev
->
dce
;
return
TRUE
;
}
break
;
case
X11DRV_SET_DCE
:
if
(
in_count
>=
sizeof
(
struct
x11drv_escape_set_dce
))
{
const
struct
x11drv_escape_set_dce
*
data
=
(
const
struct
x11drv_escape_set_dce
*
)
in_data
;
physDev
->
dce
=
data
->
dce
;
return
TRUE
;
}
FIXME
(
"%x escape no longer supported
\n
"
,
*
(
const
enum
x11drv_escape_codes
*
)
in_data
);
break
;
case
X11DRV_GET_GLX_DRAWABLE
:
if
(
out_count
>=
sizeof
(
Drawable
))
...
...
dlls/winex11.drv/x11drv.h
View file @
3bd142e9
...
...
@@ -65,7 +65,6 @@ typedef int Status;
#define MAX_DASHLEN 16
struct
tagCURSORICONINFO
;
struct
dce
;
extern
void
wine_tsx11_lock
(
void
);
extern
void
wine_tsx11_unlock
(
void
);
...
...
@@ -137,7 +136,6 @@ typedef struct
int
textPixel
;
int
depth
;
/* bit depth of the DC */
int
exposures
;
/* count of graphics exposures operations */
struct
dce
*
dce
;
/* opaque pointer to DCE */
int
current_pf
;
Drawable
gl_drawable
;
Pixmap
pixmap
;
/* Pixmap for a GLXPixmap gl_drawable */
...
...
@@ -476,8 +474,8 @@ enum x11drv_escape_codes
X11DRV_SET_DRAWABLE
,
/* set current drawable for a DC */
X11DRV_START_EXPOSURES
,
/* start graphics exposures */
X11DRV_END_EXPOSURES
,
/* end graphics exposures */
X11DRV_GET_DCE
,
/*
get the DCE pointer
*/
X11DRV_SET_DCE
,
/*
set the DCE pointer
*/
X11DRV_GET_DCE
,
/*
no longer used
*/
X11DRV_SET_DCE
,
/*
no longer used
*/
X11DRV_GET_GLX_DRAWABLE
,
/* get current glx drawable for a DC */
X11DRV_SYNC_PIXMAP
,
/* sync the dibsection to its pixmap */
X11DRV_FLUSH_GL_DRAWABLE
/* flush changes made to the gl drawable */
...
...
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