[PATCH] winex11.drv: Add Proper Initialization for border_pixel.
Nicholas Niro
nik_89 at neuroponic.com
Mon Feb 14 22:28:18 CST 2011
This change fixes a bug with certain intel and
radeon cards that makes it impossible to run any d3d apps.
It is actually a standard initialisation method
that various GLX tutorials (and even the OpenGL 3.0 context creation
code example, see below) add to their own code;
Without this fix, the initialisation
of the border_pixel attribute is left to be set
by the X11 graphic card driver and is thus an unwanted behavior.
see http://tronche.com/gui/x/xlib/window/attributes/border.html
for details on the border_pixel attribute.
see http://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)
for the same attribute initialisation as added from
this patch.
---
dlls/winex11.drv/opengl.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 3869619..d6b955a 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -336,8 +336,11 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void)
root = RootWindow( gdi_display, vis->screen );
if (vis->visual != DefaultVisual( gdi_display, vis->screen ))
attr.colormap = XCreateColormap( gdi_display, root, vis->visual, AllocNone );
+
+ attr.border_pixel = 0;
+
if ((win = XCreateWindow( gdi_display, root, -1, -1, 1, 1, 0, vis->depth, InputOutput,
- vis->visual, CWOverrideRedirect | CWColormap, &attr )))
+ vis->visual, CWBorderPixel | CWOverrideRedirect | CWColormap, &attr )))
XMapWindow( gdi_display, win );
else
win = root;
--
1.7.3
--Boundary_(ID_jUUodbFubJVXqoIQFpSdiQ)--
More information about the wine-patches
mailing list