diff options
Diffstat (limited to 'xorg-server/hw/xfree86')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86DGA.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Init.c | 3 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Module.h | 6 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Xinput.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86cmap.c | 49 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86xv.c | 27 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c | 70 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/doc/sgml/DESIGN.sgml | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/ramdac/xf86Cursor.c | 2 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/vgahw/vgaCmap.c | 14 |
10 files changed, 94 insertions, 83 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86DGA.c b/xorg-server/hw/xfree86/common/xf86DGA.c index 804fd37c1..1a1032786 100644 --- a/xorg-server/hw/xfree86/common/xf86DGA.c +++ b/xorg-server/hw/xfree86/common/xf86DGA.c @@ -731,7 +731,7 @@ DGAInstallCmap(ColormapPtr cmap) /* We rely on the extension to check that DGA is active */ if(!pScreenPriv->dgaColormap) - pScreenPriv->savedColormap = miInstalledMaps[pScreen->myNum]; + pScreenPriv->savedColormap = GetInstalledmiColormap(pScreen); pScreenPriv->dgaColormap = cmap; diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c index 03a29ea0f..55d7a6209 100644 --- a/xorg-server/hw/xfree86/common/xf86Init.c +++ b/xorg-server/hw/xfree86/common/xf86Init.c @@ -552,9 +552,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) xf86Initialising = TRUE; if (serverGeneration == 1) { - - pScreenInfo->numScreens = 0; - if ((xf86ServerName = strrchr(argv[0], '/')) != 0) xf86ServerName++; else diff --git a/xorg-server/hw/xfree86/common/xf86Module.h b/xorg-server/hw/xfree86/common/xf86Module.h index bbf5786c9..d61758f78 100644 --- a/xorg-server/hw/xfree86/common/xf86Module.h +++ b/xorg-server/hw/xfree86/common/xf86Module.h @@ -82,9 +82,9 @@ typedef enum { * mask is 0xFFFF0000. */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) -#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(7, 0) -#define ABI_XINPUT_VERSION SET_ABI_VERSION(9, 0) -#define ABI_EXTENSION_VERSION SET_ABI_VERSION(3, 0) +#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(8, 0) +#define ABI_XINPUT_VERSION SET_ABI_VERSION(10, 0) +#define ABI_EXTENSION_VERSION SET_ABI_VERSION(4, 0) #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6) #define MODINFOSTRING1 0xef23fdc5 diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c index dba3370f3..a1a5527f4 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.c +++ b/xorg-server/hw/xfree86/common/xf86Xinput.c @@ -825,7 +825,7 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs, } if (!idev->driver || !idev->identifier) { - xf86Msg(X_ERROR, "No input driver/identifier specified (ignoring)\n"); + xf86Msg(X_INFO, "No input driver/identifier specified (ignoring)\n"); rval = BadRequest; goto unwind; } diff --git a/xorg-server/hw/xfree86/common/xf86cmap.c b/xorg-server/hw/xfree86/common/xf86cmap.c index f60d96e7d..e266ffb6d 100644 --- a/xorg-server/hw/xfree86/common/xf86cmap.c +++ b/xorg-server/hw/xfree86/common/xf86cmap.c @@ -63,10 +63,10 @@ #define SCREEN_EPILOGUE(pScreen, field, wrapper)\ ((pScreen)->field = wrapper) -#define LOAD_PALETTE(pmap, index) \ - ((pmap == miInstalledMaps[index]) && \ +#define LOAD_PALETTE(pmap) \ + ((pmap == GetInstalledmiColormap(pmap->pScreen)) && \ ((pScreenPriv->flags & CMAP_LOAD_EVEN_IF_OFFSCREEN) || \ - xf86Screens[index]->vtSema || pScreenPriv->isDGAmode)) + xf86Screens[pmap->pScreen->myNum]->vtSema || pScreenPriv->isDGAmode)) typedef struct _CMapLink { @@ -221,7 +221,7 @@ Bool xf86HandleColormaps( } /* Force the initial map to be loaded */ - miInstalledMaps[pScreen->myNum] = NULL; + SetInstalledmiColormap(pScreen, NULL); CMapInstallColormap(pDefMap); return TRUE; } @@ -425,11 +425,10 @@ static void CMapInstallColormap(ColormapPtr pmap) { ScreenPtr pScreen = pmap->pScreen; - int index = pScreen->myNum; CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( &pScreen->devPrivates, CMapScreenKey); - if (pmap == miInstalledMaps[index]) + if (pmap == GetInstalledmiColormap(pmap->pScreen)) return; pScreen->InstallColormap = pScreenPriv->InstallColormap; @@ -438,15 +437,15 @@ CMapInstallColormap(ColormapPtr pmap) /* Important. We let the lower layers, namely DGA, overwrite the choice of Colormap to install */ - if (miInstalledMaps[index]) - pmap = miInstalledMaps[index]; + if (GetInstalledmiColormap(pmap->pScreen)) + pmap = GetInstalledmiColormap(pmap->pScreen); if (!(pScreenPriv->flags & CMAP_PALETTED_TRUECOLOR) && (pmap->pVisual->class == TrueColor) && CMapColormapUseMax(pmap->pVisual, pScreenPriv)) return; - if(LOAD_PALETTE(pmap, index)) + if(LOAD_PALETTE(pmap)) CMapReinstallMap(pmap); } @@ -461,8 +460,8 @@ CMapEnterVT(int index, int flags) &pScreen->devPrivates, CMapScreenKey); if((*pScreenPriv->EnterVT)(index, flags)) { - if(miInstalledMaps[index]) - CMapReinstallMap(miInstalledMaps[index]); + if(GetInstalledmiColormap(pScreen)) + CMapReinstallMap(GetInstalledmiColormap(pScreen)); return TRUE; } return FALSE; @@ -477,8 +476,8 @@ CMapSwitchMode(int index, DisplayModePtr mode, int flags) &pScreen->devPrivates, CMapScreenKey); if((*pScreenPriv->SwitchMode)(index, mode, flags)) { - if(miInstalledMaps[index]) - CMapReinstallMap(miInstalledMaps[index]); + if(GetInstalledmiColormap(pScreen)) + CMapReinstallMap(GetInstalledmiColormap(pScreen)); return TRUE; } return FALSE; @@ -497,9 +496,9 @@ CMapSetDGAMode(int index, int num, DGADevicePtr dev) pScreenPriv->isDGAmode = DGAActive(index); - if(!pScreenPriv->isDGAmode && miInstalledMaps[index] + if(!pScreenPriv->isDGAmode && GetInstalledmiColormap(pScreen) && xf86Screens[pScreen->myNum]->vtSema) - CMapReinstallMap(miInstalledMaps[index]); + CMapReinstallMap(GetInstalledmiColormap(pScreen)); return ret; } @@ -649,7 +648,7 @@ CMapRefreshColors(ColormapPtr pmap, int defs, int* indices) } - if(LOAD_PALETTE(pmap, pmap->pScreen->myNum)) + if(LOAD_PALETTE(pmap)) (*pScrn->LoadPalette)(pScreenPriv->pScrn, defs, indices, colors, pmap->pVisual); @@ -802,7 +801,7 @@ CMapSetOverscan(ColormapPtr pmap, int defs, int *indices) } if (newOverscan) { pColPriv->overscan = overscan; - if (LOAD_PALETTE(pmap, pmap->pScreen->myNum)) { + if (LOAD_PALETTE(pmap)) { #ifdef DEBUGOVERSCAN ErrorF("SetOverscan() called from CmapSetOverscan\n"); #endif @@ -929,10 +928,10 @@ CMapChangeGamma( pLink = pLink->next; } - if(miInstalledMaps[pScreen->myNum] && + if(GetInstalledmiColormap(pScreen) && ((pScreenPriv->flags & CMAP_LOAD_EVEN_IF_OFFSCREEN) || pScrn->vtSema || pScreenPriv->isDGAmode)) { - ColormapPtr pMap = miInstalledMaps[pScreen->myNum]; + ColormapPtr pMap = GetInstalledmiColormap(pScreen); if (!(pScreenPriv->flags & CMAP_PALETTED_TRUECOLOR) && (pMap->pVisual->class == TrueColor) && @@ -951,9 +950,9 @@ CMapChangeGamma( if(pLink) { /* need to trick CMapRefreshColors() into thinking this is the currently installed map */ - miInstalledMaps[pScreen->myNum] = pLink->cmap; + SetInstalledmiColormap(pScreen, pLink->cmap); CMapReinstallMap(pLink->cmap); - miInstalledMaps[pScreen->myNum] = pMap; + SetInstalledmiColormap(pScreen, pMap); } } else CMapReinstallMap(pMap); @@ -1035,10 +1034,10 @@ xf86ChangeGammaRamp( pLink = pLink->next; } - if(miInstalledMaps[pScreen->myNum] && + if(GetInstalledmiColormap(pScreen) && ((pScreenPriv->flags & CMAP_LOAD_EVEN_IF_OFFSCREEN) || pScrn->vtSema || pScreenPriv->isDGAmode)) { - ColormapPtr pMap = miInstalledMaps[pScreen->myNum]; + ColormapPtr pMap = GetInstalledmiColormap(pScreen); if (!(pScreenPriv->flags & CMAP_PALETTED_TRUECOLOR) && (pMap->pVisual->class == TrueColor) && @@ -1057,9 +1056,9 @@ xf86ChangeGammaRamp( if(pLink) { /* need to trick CMapRefreshColors() into thinking this is the currently installed map */ - miInstalledMaps[pScreen->myNum] = pLink->cmap; + SetInstalledmiColormap(pScreen, pLink->cmap); CMapReinstallMap(pLink->cmap); - miInstalledMaps[pScreen->myNum] = pMap; + SetInstalledmiColormap(pScreen, pMap); } } else CMapReinstallMap(pMap); diff --git a/xorg-server/hw/xfree86/common/xf86xv.c b/xorg-server/hw/xfree86/common/xf86xv.c index bdcc4fc2b..2cc2f6093 100644 --- a/xorg-server/hw/xfree86/common/xf86xv.c +++ b/xorg-server/hw/xfree86/common/xf86xv.c @@ -186,7 +186,9 @@ typedef struct { int num; } OffscreenImageRec; -static OffscreenImageRec OffscreenImages[MAXSCREENS]; +static int OffscreenPrivateKeyIndex; +static DevPrivateKey OffscreenPrivateKey = &OffscreenPrivateKeyIndex; +#define GetOffscreenImage(pScreen) ((OffscreenImageRec *) dixLookupPrivate(&(pScreen)->devPrivates, OffscreenPrivateKey)) Bool xf86XVRegisterOffscreenImages( @@ -194,9 +196,18 @@ xf86XVRegisterOffscreenImages( XF86OffscreenImagePtr images, int num ){ - OffscreenImages[pScreen->myNum].num = num; - OffscreenImages[pScreen->myNum].images = images; - + OffscreenImageRec *OffscreenImage; + /* This function may be called before xf86XVScreenInit, so there's + * no better place than this to call dixRequestPrivate to ensure we + * have space reserved. After the first call it is a no-op. */ + if(!dixRequestPrivate(OffscreenPrivateKey, sizeof(OffscreenImageRec)) || + !(OffscreenImage = GetOffscreenImage(pScreen))) + /* Every X.org driver assumes this function always succeeds, so + * just die on allocation failure. */ + FatalError("Could not allocate private storage for XV offscreen images.\n"); + + OffscreenImage->num = num; + OffscreenImage->images = images; return TRUE; } @@ -205,8 +216,9 @@ xf86XVQueryOffscreenImages( ScreenPtr pScreen, int *num ){ - *num = OffscreenImages[pScreen->myNum].num; - return OffscreenImages[pScreen->myNum].images; + OffscreenImageRec *OffscreenImage = GetOffscreenImage(pScreen); + *num = OffscreenImage->num; + return OffscreenImage->images; } @@ -1177,9 +1189,6 @@ xf86XVCloseScreen(int i, ScreenPtr pScreen) XvAdaptorPtr pa; int c; - /* Clear offscreen images */ - memset(&OffscreenImages[pScreen->myNum], 0, sizeof(OffscreenImages[0])); - if(!ScreenPriv) return TRUE; if(ScreenPriv->videoGC) { diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c b/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c index 5367bcc42..038551467 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c +++ b/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c @@ -57,12 +57,12 @@ static void XDGAResetProc(ExtensionEntry *extEntry); static void DGAClientStateChange (CallbackListPtr*, pointer, pointer); -static ClientPtr DGAClients[MAXSCREENS]; - unsigned char DGAReqCode = 0; int DGAErrorBase; int DGAEventBase; +static int DGAScreenPrivateKeyIndex; +static DevPrivateKey DGAScreenPrivateKey = &DGAScreenPrivateKeyIndex; static int DGAClientPrivateKeyIndex; static DevPrivateKey DGAClientPrivateKey = &DGAClientPrivateKeyIndex; static int DGACallbackRefCount = 0; @@ -73,6 +73,11 @@ typedef struct { int minor; } DGAPrivRec, *DGAPrivPtr; +#define DGA_GETCLIENT(idx) ((ClientPtr) \ + dixLookupPrivate(&screenInfo.screens[idx]->devPrivates, DGAScreenPrivateKey)) +#define DGA_SETCLIENT(idx,p) \ + dixSetPrivate(&screenInfo.screens[idx]->devPrivates, DGAScreenPrivateKey, p) + #define DGA_GETPRIV(c) ((DGAPrivPtr) \ dixLookupPrivate(&(c)->devPrivates, DGAClientPrivateKey)) #define DGA_SETPRIV(c,p) \ @@ -93,9 +98,6 @@ XFree86DGAExtensionInit(INITARGS) StandardMinorOpcode))) { int i; - for(i = 0; i < MAXSCREENS; i++) - DGAClients[i] = NULL; - DGAReqCode = (unsigned char)extEntry->base; DGAErrorBase = extEntry->errorBase; DGAEventBase = extEntry->eventBase; @@ -282,7 +284,7 @@ DGAClientStateChange ( int i; for(i = 0; i < screenInfo.numScreens; i++) { - if(DGAClients[i] == pci->client) { + if(DGA_GETCLIENT(i) == pci->client) { client = pci->client; break; } @@ -294,7 +296,7 @@ DGAClientStateChange ( XDGAModeRec mode; PixmapPtr pPix; - DGAClients[i] = NULL; + DGA_SETCLIENT(i, NULL); DGASelectInput(i, NULL, 0); DGASetMode(i, 0, &mode, &pPix); @@ -311,10 +313,12 @@ ProcXDGASetMode(ClientPtr client) XDGAModeRec mode; xXDGAModeInfo info; PixmapPtr pPix; + ClientPtr owner; int size; if (stuff->screen > screenInfo.numScreens) return BadValue; + owner = DGA_GETCLIENT(stuff->screen); REQUEST_SIZE_MATCH(xXDGASetModeReq); rep.type = X_Reply; @@ -326,16 +330,15 @@ ProcXDGASetMode(ClientPtr client) if (!DGAAvailable(stuff->screen)) return DGAErrorBase + XF86DGANoDirectVideoMode; - if(DGAClients[stuff->screen] && - (DGAClients[stuff->screen] != client)) + if(owner && owner != client) return DGAErrorBase + XF86DGANoDirectVideoMode; if(!stuff->mode) { - if(DGAClients[stuff->screen]) { + if(owner) { if(--DGACallbackRefCount == 0) DeleteCallback(&ClientStateCallback, DGAClientStateChange, NULL); } - DGAClients[stuff->screen] = NULL; + DGA_SETCLIENT(stuff->screen, NULL); DGASelectInput(stuff->screen, NULL, 0); DGASetMode(stuff->screen, 0, &mode, &pPix); WriteToClient(client, sz_xXDGASetModeReply, (char*)&rep); @@ -345,12 +348,12 @@ ProcXDGASetMode(ClientPtr client) if(Success != DGASetMode(stuff->screen, stuff->mode, &mode, &pPix)) return BadValue; - if(!DGAClients[stuff->screen]) { + if(!owner) { if(DGACallbackRefCount++ == 0) AddCallback (&ClientStateCallback, DGAClientStateChange, NULL); } - DGAClients[stuff->screen] = client; + DGA_SETCLIENT(stuff->screen, client); if(pPix) { if(AddResource(stuff->pid, RT_PIXMAP, (pointer)(pPix))) { @@ -405,7 +408,7 @@ ProcXDGASetViewport(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGASetViewportReq); @@ -425,7 +428,7 @@ ProcXDGAInstallColormap(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGAInstallColormapReq); @@ -451,12 +454,12 @@ ProcXDGASelectInput(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGASelectInputReq); - if(DGAClients[stuff->screen] == client) + if(DGA_GETCLIENT(stuff->screen) == client) DGASelectInput(stuff->screen, client, stuff->mask); return (client->noClientException); @@ -471,7 +474,7 @@ ProcXDGAFillRectangle(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGAFillRectangleReq); @@ -491,7 +494,7 @@ ProcXDGACopyArea(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGACopyAreaReq); @@ -512,7 +515,7 @@ ProcXDGACopyTransparentArea(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGACopyTransparentAreaReq); @@ -534,7 +537,7 @@ ProcXDGAGetViewportStatus(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGAGetViewportStatusReq); @@ -557,7 +560,7 @@ ProcXDGASync(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGASyncReq); @@ -602,7 +605,7 @@ ProcXDGAChangePixmapMode(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGAChangePixmapModeReq); @@ -633,7 +636,7 @@ ProcXDGACreateColormap(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGACreateColormapReq); @@ -713,18 +716,19 @@ ProcXF86DGADirectVideo(ClientPtr client) int num; PixmapPtr pix; XDGAModeRec mode; + ClientPtr owner; REQUEST(xXF86DGADirectVideoReq); if (stuff->screen > screenInfo.numScreens) return BadValue; + owner = DGA_GETCLIENT(stuff->screen); REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq); if (!DGAAvailable(stuff->screen)) return DGAErrorBase + XF86DGANoDirectVideoMode; - if (DGAClients[stuff->screen] && - (DGAClients[stuff->screen] != client)) + if (owner && owner != client) return DGAErrorBase + XF86DGANoDirectVideoMode; if (stuff->enable & XF86DGADirectGraphics) { @@ -743,19 +747,19 @@ ProcXF86DGADirectVideo(ClientPtr client) /* We need to track the client and attach the teardown callback */ if (stuff->enable & (XF86DGADirectGraphics | XF86DGADirectKeyb | XF86DGADirectMouse)) { - if (!DGAClients[stuff->screen]) { + if (!owner) { if (DGACallbackRefCount++ == 0) AddCallback (&ClientStateCallback, DGAClientStateChange, NULL); } - DGAClients[stuff->screen] = client; + DGA_SETCLIENT(stuff->screen, client); } else { - if (DGAClients[stuff->screen]) { + if (owner) { if (--DGACallbackRefCount == 0) DeleteCallback(&ClientStateCallback, DGAClientStateChange, NULL); } - DGAClients[stuff->screen] = NULL; + DGA_SETCLIENT(stuff->screen, NULL); } return (client->noClientException); @@ -800,7 +804,7 @@ ProcXF86DGASetViewPort(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if (DGAClients[stuff->screen] != client) + if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXF86DGASetViewPortReq); @@ -864,7 +868,7 @@ ProcXF86DGAInstallColormap(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if (DGAClients[stuff->screen] != client) + if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXF86DGAInstallColormapReq); @@ -913,7 +917,7 @@ ProcXF86DGAViewPortChanged(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if (DGAClients[stuff->screen] != client) + if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXF86DGAViewPortChangedReq); diff --git a/xorg-server/hw/xfree86/doc/sgml/DESIGN.sgml b/xorg-server/hw/xfree86/doc/sgml/DESIGN.sgml index 5beff653f..e95df7999 100644 --- a/xorg-server/hw/xfree86/doc/sgml/DESIGN.sgml +++ b/xorg-server/hw/xfree86/doc/sgml/DESIGN.sgml @@ -1,5 +1,5 @@ <!DOCTYPE linuxdoc PUBLIC "-//Xorg//DTD linuxdoc//EN" [ - <!ENTITY % defs SYSTEM "defs.ent"> %defs; + <!ENTITY % defs SYSTEM "X11/defs.ent"> %defs; <!-- config file keyword markup --> <!ENTITY s.key STARTTAG "bf"> <!ENTITY e.key ENDTAG "bf"> diff --git a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c index f5f087314..346e99490 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c +++ b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c @@ -312,6 +312,8 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, xf86SetCursor(pScreen, NullCursor, x, y); ScreenPriv->isUp = FALSE; } + if (ScreenPriv->CurrentCursor) + FreeCursor(ScreenPriv->CurrentCursor, None); ScreenPriv->CurrentCursor = NullCursor; return; } diff --git a/xorg-server/hw/xfree86/vgahw/vgaCmap.c b/xorg-server/hw/xfree86/vgahw/vgaCmap.c index 5bd38b468..06eeb4ce1 100644 --- a/xorg-server/hw/xfree86/vgahw/vgaCmap.c +++ b/xorg-server/hw/xfree86/vgahw/vgaCmap.c @@ -50,7 +50,7 @@ vgaListInstalledColormaps(pScreen, pmaps) /* By the time we are processing requests, we can guarantee that there * is always a colormap installed */ - *pmaps = miInstalledMaps[pScreen->myNum]->mid; + *pmaps = GetInstalledmiColormap(pScreen)->mid; return(1); } @@ -62,13 +62,13 @@ vgaGetInstalledColormaps(pScreen, pmaps) /* By the time we are processing requests, we can guarantee that there * is always a colormap installed */ - *pmaps = miInstalledMaps[pScreen->myNum]; + *pmaps = GetInstalledmiColormap(pScreen); return(1); } int vgaCheckColorMap(ColormapPtr pmap) { - return (pmap != miInstalledMaps[pmap->pScreen->myNum]); + return (pmap != GetInstalledmiColormap(pmap->pScreen)); } @@ -217,7 +217,7 @@ void vgaInstallColormap(pmap) ColormapPtr pmap; { - ColormapPtr oldmap = miInstalledMaps[pmap->pScreen->myNum]; + ColormapPtr oldmap = GetInstalledmiColormap(pmap->pScreen); int entries; Pixel * ppix; xrgb * prgb; @@ -242,7 +242,7 @@ vgaInstallColormap(pmap) if ( oldmap != NOMAPYET) WalkTree( pmap->pScreen, TellLostMap, &oldmap->mid); - miInstalledMaps[pmap->pScreen->myNum] = pmap; + SetInstalledmiColormap(pmap->pScreen, pmap); for ( i=0; i<entries; i++) ppix[i] = i; @@ -273,13 +273,13 @@ vgaUninstallColormap(pmap) ColormapPtr defColormap; - if ( pmap != miInstalledMaps[pmap->pScreen->myNum] ) + if ( pmap != GetInstalledmiColormap(pmap->pScreen)) return; dixLookupResourceByType((pointer *)&defColormap, pmap->pScreen->defColormap, RT_COLORMAP, serverClient, DixInstallAccess); - if (defColormap == miInstalledMaps[pmap->pScreen->myNum]) + if (defColormap == GetInstalledmiColormap(pmap->pScreen)) return; (*pmap->pScreen->InstallColormap) (defColormap); |