Module: Mesa
Branch: master
Commit: 2af17433b5b037af99198acfac567c57618286c3
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=2af17433b5b037af99198acfac567c57618286c3

Author: Adam Jackson <[email protected]>
Date:   Tue Jan  3 14:39:28 2012 -0500

drisw: Fix drawable creation against non-default screens

We don't want to match the visual against the default screen.  If the
drawable is on a non-default screen then the appropriate visual might not
exist on the default screen.  Conversely, if the same visual is
available on multiple screens then simply selecting for the right VID is
sufficient, since the server has promised that the same visual is
compatible with multiple screens.

Reviewed-by: Ian Romanick <[email protected]>
Signed-off-by: Adam Jackson <[email protected]>

---

 src/glx/drisw_glx.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 2d83a50..833ea7d 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -87,9 +87,8 @@ XCreateDrawable(struct drisw_drawable * pdp,
    XChangeGC(dpy, pdp->swapgc, GCGraphicsExposures, &gcvalues);
 
    /* visual */
-   visTemp.screen = DefaultScreen(dpy);
    visTemp.visualid = visualid;
-   visMask = (VisualScreenMask | VisualIDMask);
+   visMask = VisualIDMask;
    pdp->visinfo = XGetVisualInfo(dpy, visMask, &visTemp, &num_visuals);
 
    /* create XImage */

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to