aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c5
-rw-r--r--nx-X11/programs/Xserver/mi/mi.h10
-rw-r--r--nx-X11/programs/Xserver/mi/micmap.c4
-rw-r--r--nx-X11/programs/Xserver/mi/miinitext.c15
-rw-r--r--nx-X11/programs/Xserver/mi/mipointer.c2
-rw-r--r--nx-X11/programs/Xserver/mi/miscrinit.c26
-rw-r--r--nx-X11/programs/Xserver/mi/misprite.c22
-rw-r--r--nx-X11/programs/Xserver/mi/mivaltree.c24
-rw-r--r--nx-X11/programs/Xserver/mi/miwideline.c9
-rw-r--r--nx-X11/programs/Xserver/miext/damage/Imakefile2
-rw-r--r--nx-X11/programs/Xserver/miext/damage/damagestr.h1
11 files changed, 45 insertions, 75 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c
index bcb88d42d..04f746aaf 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c
@@ -504,7 +504,7 @@ int what;
BITS32 gcmask, index, mask;
RegionRec prgnWin;
DDXPointRec oldCorner;
- BoxRec box;
+ BoxRec box = {0};
WindowPtr pBgWin;
GCPtr pGC;
register int i;
@@ -566,8 +566,7 @@ int what;
}
}
- prect = (xRectangle *)malloc(RegionNumRects(prgn) *
- sizeof(xRectangle));
+ prect = (xRectangle *)calloc(RegionNumRects(prgn), sizeof(xRectangle));
if (!prect)
return;
diff --git a/nx-X11/programs/Xserver/mi/mi.h b/nx-X11/programs/Xserver/mi/mi.h
index 409e21e34..a1ad969ac 100644
--- a/nx-X11/programs/Xserver/mi/mi.h
+++ b/nx-X11/programs/Xserver/mi/mi.h
@@ -134,16 +134,6 @@ extern void miPutImage(
char * /*pImage*/
);
-/* miclipn.c */
-
-extern void miClipNotify(
- void (* /*func*/)(
- WindowPtr /* pWin */,
- int /* dx */,
- int /* dy */
- )
-);
-
/* micursor.c */
extern void miRecolorCursor(
diff --git a/nx-X11/programs/Xserver/mi/micmap.c b/nx-X11/programs/Xserver/mi/micmap.c
index c01d7d333..3fd016712 100644
--- a/nx-X11/programs/Xserver/mi/micmap.c
+++ b/nx-X11/programs/Xserver/mi/micmap.c
@@ -586,8 +586,10 @@ miDoInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp,
if (nvtype)
{
vid = (VisualID *) malloc (nvtype * sizeof (VisualID));
- if (!vid)
+ if (!vid) {
+ free(preferredCVCs);
return FALSE;
+ }
}
depth->depth = d;
depth->numVids = nvtype;
diff --git a/nx-X11/programs/Xserver/mi/miinitext.c b/nx-X11/programs/Xserver/mi/miinitext.c
index f40ea8a8e..5f9d96302 100644
--- a/nx-X11/programs/Xserver/mi/miinitext.c
+++ b/nx-X11/programs/Xserver/mi/miinitext.c
@@ -80,9 +80,6 @@ extern Bool noDamageExtension;
#ifdef DBE
extern Bool noDbeExtension;
#endif
-#ifdef DPSEXT
-extern Bool noDPSExtension;
-#endif
#ifdef DPMSExtension
extern Bool noDPMSExtension;
#endif
@@ -142,7 +139,6 @@ extern Bool noXIdleExtension;
extern Bool noXvExtension;
#endif
-#define INITARGS void
typedef void (*InitExtension)(void);
#ifdef MITSHM
@@ -228,6 +224,11 @@ extern void SecurityExtensionInit(void);
extern void XFree86BigfontExtensionInit(void);
#endif
#ifdef GLXEXT
+/*
+typedef struct __GLXprovider __GLXprovider;
+extern __GLXprovider __glXMesaProvider;
+extern void GlxPushProvider(__GLXprovider *impl);
+*/
#ifndef __DARWIN__
extern void GlxExtensionInit(void);
extern void GlxWrapInitVisuals(miInitVisualsProcPtr *);
@@ -290,9 +291,6 @@ static ExtensionToggle ExtensionToggleList[] =
#ifdef DBE
{ "DOUBLE-BUFFER", &noDbeExtension },
#endif
-#ifdef DPSEXT
- { "DPSExtension", &noDPSExtension },
-#endif
#ifdef DPMSExtension
{ "DPMS", &noDPMSExtension },
#endif
@@ -447,6 +445,9 @@ InitExtensions(argc, argv)
#endif
#endif
#ifdef GLXEXT
+ /*
+ GlxPushProvider(&__glXMesaProvider);
+ */
#ifndef __DARWIN__
if (!noGlxExtension) GlxExtensionInit();
#else
diff --git a/nx-X11/programs/Xserver/mi/mipointer.c b/nx-X11/programs/Xserver/mi/mipointer.c
index dc5a4985d..5a874a4a0 100644
--- a/nx-X11/programs/Xserver/mi/mipointer.c
+++ b/nx-X11/programs/Xserver/mi/mipointer.c
@@ -45,7 +45,7 @@ in this Software without prior written authorization from The Open Group.
# include "dixstruct.h"
# include <nx-X11/extensions/XI.h>
-int miPointerScreenIndex;
+int miPointerScreenIndex;
static unsigned long miPointerGeneration = 0;
#define GetScreenPrivate(s) ((miPointerScreenPtr) ((s)->devPrivates[miPointerScreenIndex].ptr))
diff --git a/nx-X11/programs/Xserver/mi/miscrinit.c b/nx-X11/programs/Xserver/mi/miscrinit.c
index e38284c50..cb46d1fa7 100644
--- a/nx-X11/programs/Xserver/mi/miscrinit.c
+++ b/nx-X11/programs/Xserver/mi/miscrinit.c
@@ -262,33 +262,7 @@ miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width,
/* CreateGC */
/* CreateColormap, DestroyColormap, InstallColormap, UninstallColormap */
/* ListInstalledColormaps, StoreColors, ResolveColor */
-#ifdef NEED_SCREEN_REGIONS
- pScreen->RegionCreate = RegionCreate;
- pScreen->RegionInit = RegionInit;
- pScreen->RegionCopy = RegionCopy;
- pScreen->RegionDestroy = RegionDestroy;
- pScreen->RegionUninit = RegionUninit;
- pScreen->Intersect = RegionIntersect;
- pScreen->Union = RegionUnion;
- pScreen->Subtract = RegionSubtract;
- pScreen->Inverse = RegionInverse;
- pScreen->RegionReset = RegionReset;
- pScreen->TranslateRegion = RegionTranslate;
- pScreen->RectIn = RegionContainsRect;
- pScreen->PointInRegion = RegionContainsPoint;
- pScreen->RegionNotEmpty = RegionNotEmpty;
- pScreen->RegionEqual = RegionEqual;
- pScreen->RegionBroken = RegionBroken;
- pScreen->RegionBreak = RegionBreak;
- pScreen->RegionEmpty = RegionEmpty;
- pScreen->RegionExtents = RegionExtents;
- pScreen->RegionAppend = RegionAppend;
- pScreen->RegionValidate = RegionValidate;
-#endif /* NEED_SCREEN_REGIONS */
/* BitmapToRegion */
-#ifdef NEED_SCREEN_REGIONS
- pScreen->RectsToRegion = RegionFromRects;
-#endif /* NEED_SCREEN_REGIONS */
pScreen->SendGraphicsExpose = miSendGraphicsExpose;
pScreen->BlockHandler = (ScreenBlockHandlerProcPtr)NoopDDA;
pScreen->WakeupHandler = (ScreenWakeupHandlerProcPtr)NoopDDA;
diff --git a/nx-X11/programs/Xserver/mi/misprite.c b/nx-X11/programs/Xserver/mi/misprite.c
index 151de776d..62acb5d29 100644
--- a/nx-X11/programs/Xserver/mi/misprite.c
+++ b/nx-X11/programs/Xserver/mi/misprite.c
@@ -98,11 +98,11 @@ static void miSpriteComputeSaved(ScreenPtr pScreen);
((pScreen)->field = \
((miSpriteScreenPtr) (pScreen)->devPrivates[miSpriteScreenIndex].ptr)->field)
-#define SCREEN_EPILOGUE(pScreen, field, wrapper)\
- ((pScreen)->field = wrapper)
+#define SCREEN_EPILOGUE(pScreen, field)\
+ ((pScreen)->field = miSprite##field)
/*
- * void *-sprite method table
+ * pointer-sprite method table
*/
static Bool miSpriteRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor);
@@ -298,7 +298,7 @@ miSpriteGetImage (pDrawable, sx, sy, w, h, format, planemask, pdstLine)
(*pScreen->GetImage) (pDrawable, sx, sy, w, h,
format, planemask, pdstLine);
- SCREEN_EPILOGUE (pScreen, GetImage, miSpriteGetImage);
+ SCREEN_EPILOGUE (pScreen, GetImage);
}
static void
@@ -344,7 +344,7 @@ miSpriteGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart)
(*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
- SCREEN_EPILOGUE (pScreen, GetSpans, miSpriteGetSpans);
+ SCREEN_EPILOGUE (pScreen, GetSpans);
}
static void
@@ -370,7 +370,7 @@ miSpriteSourceValidate (pDrawable, x, y, width, height)
if (pScreen->SourceValidate)
(*pScreen->SourceValidate) (pDrawable, x, y, width, height);
- SCREEN_EPILOGUE (pScreen, SourceValidate, miSpriteSourceValidate);
+ SCREEN_EPILOGUE (pScreen, SourceValidate);
}
static void
@@ -393,7 +393,7 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
}
(*pScreen->CopyWindow) (pWindow, ptOldOrg, prgnSrc);
- SCREEN_EPILOGUE (pScreen, CopyWindow, miSpriteCopyWindow);
+ SCREEN_EPILOGUE (pScreen, CopyWindow);
}
static void
@@ -412,7 +412,7 @@ miSpriteBlockHandler (i, blockData, pTimeout, pReadmask)
(*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
- SCREEN_EPILOGUE(pScreen, BlockHandler, miSpriteBlockHandler);
+ SCREEN_EPILOGUE(pScreen, BlockHandler);
if (!pPriv->isUp && pPriv->shouldBeUp)
{
@@ -434,7 +434,7 @@ miSpriteInstallColormap (pMap)
(*pScreen->InstallColormap) (pMap);
- SCREEN_EPILOGUE(pScreen, InstallColormap, miSpriteInstallColormap);
+ SCREEN_EPILOGUE(pScreen, InstallColormap);
pPriv->pInstalledMap = pMap;
if (pPriv->pColormap != pMap)
@@ -463,7 +463,7 @@ miSpriteStoreColors (pMap, ndef, pdef)
(*pScreen->StoreColors) (pMap, ndef, pdef);
- SCREEN_EPILOGUE(pScreen, StoreColors, miSpriteStoreColors);
+ SCREEN_EPILOGUE(pScreen, StoreColors);
if (pPriv->pColormap == pMap)
{
@@ -592,7 +592,7 @@ miSpriteSaveDoomedAreas (pWin, pObscured, dx, dy)
(*pScreen->SaveDoomedAreas) (pWin, pObscured, dx, dy);
- SCREEN_EPILOGUE (pScreen, SaveDoomedAreas, miSpriteSaveDoomedAreas);
+ SCREEN_EPILOGUE (pScreen, SaveDoomedAreas);
}
/*
diff --git a/nx-X11/programs/Xserver/mi/mivaltree.c b/nx-X11/programs/Xserver/mi/mivaltree.c
index 0435925ed..21534cee0 100644
--- a/nx-X11/programs/Xserver/mi/mivaltree.c
+++ b/nx-X11/programs/Xserver/mi/mivaltree.c
@@ -237,6 +237,18 @@ miComputeClips (
dy = 32767;
borderSize.y2 = dy;
+#ifdef COMPOSITE
+ /*
+ * In redirected drawing case, reset universe to borderSize
+ */
+ if (pParent->redirectDraw)
+ {
+ if (miSetRedirectBorderClipProc)
+ (*miSetRedirectBorderClipProc) (pParent, universe);
+ RegionCopy(universe, &pParent->borderSize);
+ }
+#endif
+
oldVis = pParent->visibility;
switch (RegionContainsRect(universe, &borderSize))
{
@@ -276,18 +288,6 @@ miComputeClips (
((pParent->eventMask | wOtherEventMasks(pParent)) & VisibilityChangeMask))
SendVisibilityNotify(pParent);
-#ifdef COMPOSITE
- /*
- * In redirected drawing case, reset universe to borderSize
- */
- if (pParent->redirectDraw)
- {
- if (miSetRedirectBorderClipProc)
- (*miSetRedirectBorderClipProc) (pParent, universe);
- RegionCopy(universe, &pParent->borderSize);
- }
-#endif
-
dx = pParent->drawable.x - pParent->valdata->before.oldAbsCorner.x;
dy = pParent->drawable.y - pParent->valdata->before.oldAbsCorner.y;
diff --git a/nx-X11/programs/Xserver/mi/miwideline.c b/nx-X11/programs/Xserver/mi/miwideline.c
index 8fcf351a7..8d73eb979 100644
--- a/nx-X11/programs/Xserver/mi/miwideline.c
+++ b/nx-X11/programs/Xserver/mi/miwideline.c
@@ -119,7 +119,8 @@ miFillPolyHelper (pDrawable, pGC, pixel, spanData, y, overall_height,
oldPixel = pGC->fgPixel;
if (pixel != oldPixel)
{
- DoChangeGC (pGC, GCForeground, (XID *)&pixel, FALSE);
+ XID tmpPixel = (XID)pixel;
+ DoChangeGC (pGC, GCForeground, &tmpPixel, FALSE);
ValidateGC (pDrawable, pGC);
}
}
@@ -217,7 +218,8 @@ miFillRectPolyHelper (
oldPixel = pGC->fgPixel;
if (pixel != oldPixel)
{
- DoChangeGC (pGC, GCForeground, (XID *)&pixel, FALSE);
+ XID tmpPixel = (XID)pixel;
+ DoChangeGC (pGC, GCForeground, &tmpPixel, FALSE);
ValidateGC (pDrawable, pGC);
}
(*pGC->ops->PolyFillRect) (pDrawable, pGC, 1, &rect);
@@ -1068,7 +1070,8 @@ miLineArc (
oldPixel = pGC->fgPixel;
if (pixel != oldPixel)
{
- DoChangeGC(pGC, GCForeground, (XID *)&pixel, FALSE);
+ XID tmpPixel = (XID)pixel;
+ DoChangeGC(pGC, GCForeground, &tmpPixel, FALSE);
ValidateGC (pDraw, pGC);
}
}
diff --git a/nx-X11/programs/Xserver/miext/damage/Imakefile b/nx-X11/programs/Xserver/miext/damage/Imakefile
index 34d3fcf5a..900f52add 100644
--- a/nx-X11/programs/Xserver/miext/damage/Imakefile
+++ b/nx-X11/programs/Xserver/miext/damage/Imakefile
@@ -10,7 +10,7 @@ SRCS = damage.c
OBJS = damage.o
- INCLUDES = -I. -I../shadow -I../../mi -I../../fb -I../../include -I$(XINCLUDESRC) \
+ INCLUDES = -I. -I../../mi -I../../fb -I../../include -I$(XINCLUDESRC) \
-I$(XF86SRC)/common $(EXTRAINCLUDES) \
-I../../render -I../cw -I$(EXTINCSRC) \
`pkg-config --cflags-only-I pixman-1`
diff --git a/nx-X11/programs/Xserver/miext/damage/damagestr.h b/nx-X11/programs/Xserver/miext/damage/damagestr.h
index 62b384167..5b671cd3f 100644
--- a/nx-X11/programs/Xserver/miext/damage/damagestr.h
+++ b/nx-X11/programs/Xserver/miext/damage/damagestr.h
@@ -30,6 +30,7 @@
#define _DAMAGESTR_H_
#include "damage.h"
+#include "gcstruct.h"
#ifdef RENDER
# include "picturestr.h"
#endif