summaryrefslogtreecommitdiff
path: root/hw/dmx
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2007-12-24 13:13:19 -0500
committerAdam Jackson <ajax@redhat.com>2008-02-22 15:19:54 -0500
commitee21aba6be0078949204e315ddfffd99de60c2f1 (patch)
treed44a51d1ec696ddca109c943ca4cdd5bc11b1218 /hw/dmx
parenta4202b898f07dd733590ae5adb21e48775369781 (diff)
Fix Xinerama's consolidated visual handling.
Formerly the code claimed it could only handle up to 256 visuals, which was true. Also true, but not explicitly stated, was that it could only handle visuals with VID < 256. If you have enough screens, and subsystems that add lots of visuals, you can easily run off the end. (Made worse because we allocate visual IDs from the same pool as XIDs.) If your app then chooses a visual > 256, then the Xinerama code would throw BadMatch on CreateColormap and your app wouldn't start. With this change, PanoramiXVisualTable is gone. Other subsystems that were using it as a translation table between each screen's visuals now use a PanoramiXTranslateVisual() helper.
Diffstat (limited to 'hw/dmx')
-rw-r--r--hw/dmx/glxProxy/glxcmds.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index 6771cf1de..85e0f8701 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -66,7 +66,6 @@
#ifdef PANORAMIX
#include "panoramiXsrv.h"
-extern XID *PanoramiXVisualTable;
#endif
extern __GLXFBConfig **__glXFBConfigs;
@@ -2824,14 +2823,8 @@ int __glXGetFBConfigs(__GLXclientState *cl, GLbyte *pc)
#ifdef PANORAMIX
else if (!noPanoramiXExtension) {
/* convert the associated visualId to the panoramix one */
- for (v=0; v<255; v++) {
- if ( PanoramiXVisualTable[ v * MAXSCREENS + screen ] ==
- associatedVisualId ) {
- associatedVisualId = v;
- break;
- }
- }
- pFBConfig->associatedVisualId = associatedVisualId;
+ pFBConfig->associatedVisualId =
+ PanoramiXTranslateVisualID(screen, v);
}
#endif
}