summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
Diffstat (limited to 'glx')
-rw-r--r--glx/glxscreens.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/glx/glxscreens.c b/glx/glxscreens.c
index 496cf9e14..c4ad42648 100644
--- a/glx/glxscreens.c
+++ b/glx/glxscreens.c
@@ -395,8 +395,15 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen)
if (depth == pScreen->visuals[i].nplanes)
break;
}
+ /* if it can't, fix up the fbconfig to not advertise window support */
if (i == pScreen->numVisuals)
+ config->drawableType &= ~(GLX_WINDOW_BIT);
+
+ /* fbconfig must support window drawables */
+ if (!(config->drawableType & GLX_WINDOW_BIT)) {
+ config->visualID = 0;
continue;
+ }
/* Create a new X visual for our FBconfig. */
visual = AddScreenVisuals(pScreen, 1, depth);