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
6e9dea8a
Commit
6e9dea8a
authored
May 12, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Create all the GL drawables using the gdi_display to avoid synchronization issues.
parent
6c8d315a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
window.c
dlls/winex11.drv/window.c
+25
-25
No files found.
dlls/winex11.drv/window.c
View file @
6e9dea8a
...
...
@@ -414,7 +414,6 @@ static void sync_window_text( Display *display, Window win, const WCHAR *text )
*/
BOOL
X11DRV_set_win_format
(
HWND
hwnd
,
XID
fbconfig_id
)
{
Display
*
display
=
thread_display
();
struct
x11drv_win_data
*
data
;
XVisualInfo
*
vis
;
int
w
,
h
;
...
...
@@ -429,6 +428,7 @@ BOOL X11DRV_set_win_format( HWND hwnd, XID fbconfig_id )
if
(
data
->
whole_window
)
{
Display
*
display
=
thread_display
();
Window
client
=
data
->
client_window
;
if
(
vis
->
visualid
!=
XVisualIDFromVisual
(
visual
))
...
...
@@ -438,6 +438,7 @@ BOOL X11DRV_set_win_format( HWND hwnd, XID fbconfig_id )
}
wine_tsx11_lock
();
XFree
(
vis
);
XFlush
(
display
);
wine_tsx11_unlock
();
if
(
client
)
goto
done
;
return
FALSE
;
...
...
@@ -457,7 +458,7 @@ BOOL X11DRV_set_win_format( HWND hwnd, XID fbconfig_id )
if
(
!
parent
)
parent
=
root_window
;
wine_tsx11_lock
();
data
->
colormap
=
XCreateColormap
(
display
,
parent
,
vis
->
visual
,
data
->
colormap
=
XCreateColormap
(
gdi_
display
,
parent
,
vis
->
visual
,
(
vis
->
class
==
PseudoColor
||
vis
->
class
==
GrayScale
||
vis
->
class
==
DirectColor
)
?
...
...
@@ -467,17 +468,18 @@ BOOL X11DRV_set_win_format( HWND hwnd, XID fbconfig_id )
XInstallColormap
(
gdi_display
,
attrib
.
colormap
);
if
(
data
->
gl_drawable
)
XDestroyWindow
(
gdi_display
,
data
->
gl_drawable
);
data
->
gl_drawable
=
XCreateWindow
(
display
,
parent
,
-
w
,
0
,
w
,
h
,
0
,
data
->
gl_drawable
=
XCreateWindow
(
gdi_
display
,
parent
,
-
w
,
0
,
w
,
h
,
0
,
vis
->
depth
,
InputOutput
,
vis
->
visual
,
CWColormap
|
CWOverrideRedirect
,
&
attrib
);
if
(
data
->
gl_drawable
)
{
pXCompositeRedirectWindow
(
display
,
data
->
gl_drawable
,
pXCompositeRedirectWindow
(
gdi_
display
,
data
->
gl_drawable
,
CompositeRedirectManual
);
XMapWindow
(
display
,
data
->
gl_drawable
);
XMapWindow
(
gdi_
display
,
data
->
gl_drawable
);
}
XFree
(
vis
);
XFlush
(
gdi_display
);
wine_tsx11_unlock
();
}
else
...
...
@@ -487,8 +489,8 @@ BOOL X11DRV_set_win_format( HWND hwnd, XID fbconfig_id )
wine_tsx11_lock
();
if
(
data
->
pixmap
)
XFreePixmap
(
display
,
data
->
pixmap
);
data
->
pixmap
=
XCreatePixmap
(
display
,
root_window
,
w
,
h
,
vis
->
depth
);
if
(
data
->
pixmap
)
XFreePixmap
(
gdi_
display
,
data
->
pixmap
);
data
->
pixmap
=
XCreatePixmap
(
gdi_
display
,
root_window
,
w
,
h
,
vis
->
depth
);
if
(
!
data
->
pixmap
)
{
XFree
(
vis
);
...
...
@@ -496,14 +498,15 @@ BOOL X11DRV_set_win_format( HWND hwnd, XID fbconfig_id )
return
FALSE
;
}
if
(
data
->
gl_drawable
)
destroy_glxpixmap
(
display
,
data
->
gl_drawable
);
data
->
gl_drawable
=
create_glxpixmap
(
display
,
vis
,
data
->
pixmap
);
if
(
data
->
gl_drawable
)
destroy_glxpixmap
(
gdi_
display
,
data
->
gl_drawable
);
data
->
gl_drawable
=
create_glxpixmap
(
gdi_
display
,
vis
,
data
->
pixmap
);
if
(
!
data
->
gl_drawable
)
{
XFreePixmap
(
display
,
data
->
pixmap
);
XFreePixmap
(
gdi_
display
,
data
->
pixmap
);
data
->
pixmap
=
0
;
}
XFree
(
vis
);
XFlush
(
gdi_display
);
wine_tsx11_unlock
();
if
(
data
->
pixmap
)
SetPropA
(
hwnd
,
pixmap_prop
,
(
HANDLE
)
data
->
pixmap
);
}
...
...
@@ -517,9 +520,6 @@ BOOL X11DRV_set_win_format( HWND hwnd, XID fbconfig_id )
done:
data
->
fbconfig_id
=
fbconfig_id
;
SetPropA
(
hwnd
,
fbconfig_id_prop
,
(
HANDLE
)
data
->
fbconfig_id
);
wine_tsx11_lock
();
XFlush
(
display
);
wine_tsx11_unlock
();
/* force DCE invalidation */
SetWindowPos
(
hwnd
,
0
,
0
,
0
,
0
,
0
,
SWP_NOACTIVATE
|
SWP_NOZORDER
|
SWP_NOSIZE
|
SWP_NOMOVE
|
...
...
@@ -530,7 +530,7 @@ done:
/***********************************************************************
* sync_gl_drawable
*/
static
void
sync_gl_drawable
(
Display
*
display
,
struct
x11drv_win_data
*
data
)
static
void
sync_gl_drawable
(
struct
x11drv_win_data
*
data
)
{
int
w
=
data
->
client_rect
.
right
-
data
->
client_rect
.
left
;
int
h
=
data
->
client_rect
.
bottom
-
data
->
client_rect
.
top
;
...
...
@@ -546,7 +546,7 @@ static void sync_gl_drawable(Display *display, struct x11drv_win_data *data)
if
(
usexcomposite
)
{
wine_tsx11_lock
();
XMoveResizeWindow
(
display
,
data
->
gl_drawable
,
-
w
,
0
,
w
,
h
);
XMoveResizeWindow
(
gdi_
display
,
data
->
gl_drawable
,
-
w
,
0
,
w
,
h
);
wine_tsx11_unlock
();
return
;
}
...
...
@@ -561,7 +561,7 @@ static void sync_gl_drawable(Display *display, struct x11drv_win_data *data)
return
;
}
pix
=
XCreatePixmap
(
display
,
root_window
,
w
,
h
,
vis
->
depth
);
pix
=
XCreatePixmap
(
gdi_
display
,
root_window
,
w
,
h
,
vis
->
depth
);
if
(
!
pix
)
{
ERR
(
"Failed to create pixmap for offscreen rendering
\n
"
);
...
...
@@ -570,11 +570,11 @@ static void sync_gl_drawable(Display *display, struct x11drv_win_data *data)
return
;
}
glxp
=
create_glxpixmap
(
display
,
vis
,
pix
);
glxp
=
create_glxpixmap
(
gdi_
display
,
vis
,
pix
);
if
(
!
glxp
)
{
ERR
(
"Failed to create drawable for offscreen rendering
\n
"
);
XFreePixmap
(
display
,
pix
);
XFreePixmap
(
gdi_
display
,
pix
);
XFree
(
vis
);
wine_tsx11_unlock
();
return
;
...
...
@@ -584,14 +584,14 @@ static void sync_gl_drawable(Display *display, struct x11drv_win_data *data)
mark_drawable_dirty
(
data
->
gl_drawable
,
glxp
);
XFreePixmap
(
display
,
data
->
pixmap
);
destroy_glxpixmap
(
display
,
data
->
gl_drawable
);
XFreePixmap
(
gdi_
display
,
data
->
pixmap
);
destroy_glxpixmap
(
gdi_
display
,
data
->
gl_drawable
);
TRACE
(
"Recreated GL drawable %lx to replace %lx
\n
"
,
glxp
,
data
->
gl_drawable
);
data
->
pixmap
=
pix
;
data
->
gl_drawable
=
glxp
;
XFlush
(
display
);
XFlush
(
gdi_
display
);
wine_tsx11_unlock
();
SetPropA
(
data
->
hwnd
,
gl_drawable_prop
,
(
HANDLE
)
data
->
gl_drawable
);
...
...
@@ -1252,7 +1252,7 @@ static void sync_client_position( Display *display, struct x11drv_win_data *data
wine_tsx11_unlock
();
}
if
(
data
->
gl_drawable
&&
(
mask
&
(
CWWidth
|
CWHeight
)))
sync_gl_drawable
(
d
isplay
,
d
ata
);
if
(
data
->
gl_drawable
&&
(
mask
&
(
CWWidth
|
CWHeight
)))
sync_gl_drawable
(
data
);
}
...
...
@@ -1496,15 +1496,15 @@ void X11DRV_DestroyWindow( HWND hwnd )
if
(
data
->
pixmap
)
{
destroy_glxpixmap
(
display
,
data
->
gl_drawable
);
wine_tsx11_lock
();
XFreePixmap
(
display
,
data
->
pixmap
);
destroy_glxpixmap
(
gdi_display
,
data
->
gl_drawable
);
XFreePixmap
(
gdi_display
,
data
->
pixmap
);
wine_tsx11_unlock
();
}
else
if
(
data
->
gl_drawable
)
{
wine_tsx11_lock
();
XDestroyWindow
(
display
,
data
->
gl_drawable
);
XDestroyWindow
(
gdi_
display
,
data
->
gl_drawable
);
wine_tsx11_unlock
();
}
...
...
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