From 42e96f1d02ef6d842db6ba68353558a11d7d66e9 Mon Sep 17 00:00:00 2001 From: Tomas Carnecky Date: Sun, 15 Jun 2008 14:27:16 +0200 Subject: Reorder visuals reported by the intel driver The root window visual can not be changed. Neither at runtime nor through the configuration file. The xserver simply selects the first one that matches the class (usually TrueColor). I need a root window visual with stencil buffer because my compiz plugin uses the it for some operations. This patch reorders the visuals that the 3D driver reports and puts the one with stencil (and depth) bits as first. (cherry picked from commit 42fb06f3f14fbec070350cf48361be4a0be0af04) --- src/i830_dri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i830_dri.c b/src/i830_dri.c index 4361ad0b..6bc49578 100644 --- a/src/i830_dri.c +++ b/src/i830_dri.c @@ -386,7 +386,7 @@ I830InitVisualConfigs(ScreenPtr pScreen) i = 0; for (accum = 0; accum <= 1; accum++) { - for (depth = 0; depth <= 1; depth++) { /* and stencil */ + for (depth = 1; depth >= 0; depth--) { /* and stencil */ for (db = 1; db >= 0; db--) { pConfigs[i].vid = -1; pConfigs[i].class = -1; -- cgit v1.2.3