xserver-multidpi/Xext/panoramiXsrv.h
Adam Jackson ee21aba6be 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.
2008-02-22 15:19:54 -05:00

47 lines
1.1 KiB
C

#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifndef _PANORAMIXSRV_H_
#define _PANORAMIXSRV_H_
#include "panoramiX.h"
extern int PanoramiXNumScreens;
extern PanoramiXData *panoramiXdataPtr;
extern int PanoramiXPixWidth;
extern int PanoramiXPixHeight;
extern VisualID PanoramiXTranslateVisualID(int screen, VisualID orig);
extern void PanoramiXConsolidate(void);
extern Bool PanoramiXCreateConnectionBlock(void);
extern PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE, XID, int);
extern Bool XineramaRegisterConnectionBlockCallback(void (*func)(void));
extern int XineramaDeleteResource(pointer, XID);
extern void XineramaReinitData(ScreenPtr);
extern RegionRec XineramaScreenRegions[MAXSCREENS];
extern unsigned long XRC_DRAWABLE;
extern unsigned long XRT_WINDOW;
extern unsigned long XRT_PIXMAP;
extern unsigned long XRT_GC;
extern unsigned long XRT_COLORMAP;
extern void XineramaGetImageData(
DrawablePtr *pDrawables,
int left,
int top,
int width,
int height,
unsigned int format,
unsigned long planemask,
char *data,
int pitch,
Bool isRoot
);
#endif /* _PANORAMIXSRV_H_ */