aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-12-14 10:22:19 +0000
committermarha <marha@users.sourceforge.net>2009-12-14 10:22:19 +0000
commit9b17452909d3140fa33a753cadfaa6e9006b9685 (patch)
tree4abbb4b660ee9125cb0c20dab5a1c8de9f5a4a2d
parent75d2bbcf0f39b9c85bc270728343f61dabebce2d (diff)
downloadvcxsrv-9b17452909d3140fa33a753cadfaa6e9006b9685.tar.gz
vcxsrv-9b17452909d3140fa33a753cadfaa6e9006b9685.tar.bz2
vcxsrv-9b17452909d3140fa33a753cadfaa6e9006b9685.zip
Git update 14/12/2009
-rw-r--r--xorg-server/Xi/xiproperty.c2
-rw-r--r--xorg-server/dix/main.c4
-rw-r--r--xorg-server/exa/exa.c30
-rw-r--r--xorg-server/exa/exa_mixed.c42
-rw-r--r--xorg-server/exa/exa_priv.h1
-rw-r--r--xorg-server/fb/fb.h71
-rw-r--r--xorg-server/fb/fbpict.c169
-rw-r--r--xorg-server/fb/fbtrap.c6
-rw-r--r--xorg-server/hw/xfree86/common/xf86Configure.c1
-rw-r--r--xorg-server/hw/xquartz/mach-startup/stub.c3
-rw-r--r--xorg-server/hw/xquartz/pbproxy/Makefile.am3
-rw-r--r--xorg-server/miext/rootless/rootlessScreen.c2
-rw-r--r--xorg-server/os/backtrace.c4
-rw-r--r--xorg-server/record/set.c11
-rw-r--r--xorg-server/xkb/xkb.c12
-rw-r--r--xorg-server/xkb/xkbLEDs.c12
16 files changed, 189 insertions, 184 deletions
diff --git a/xorg-server/Xi/xiproperty.c b/xorg-server/Xi/xiproperty.c
index ecb326ee3..ea66c54c6 100644
--- a/xorg-server/Xi/xiproperty.c
+++ b/xorg-server/Xi/xiproperty.c
@@ -622,6 +622,8 @@ XIDeleteAllDeviceProperties (DeviceIntPtr device)
XIDestroyDeviceProperty(prop);
}
+ device->properties.properties = NULL;
+
/* Now free all handlers */
curr_handler = device->properties.handlers;
while(curr_handler)
diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c
index f96245a4b..d4db90c75 100644
--- a/xorg-server/dix/main.c
+++ b/xorg-server/dix/main.c
@@ -127,6 +127,8 @@ BOOL serverInitComplete = FALSE;
pthread_mutex_t serverInitCompleteMutex = PTHREAD_MUTEX_INITIALIZER;
pthread_cond_t serverInitCompleteCond = PTHREAD_COND_INITIALIZER;
+int dix_main(int argc, char *argv[], char *envp[]);
+
int dix_main(int argc, char *argv[], char *envp[])
#else
int main(int argc, char *argv[], char *envp[])
@@ -168,7 +170,6 @@ int main(int argc, char *argv[], char *envp[])
InitBlockAndWakeupHandlers();
/* Perform any operating system dependent initializations you'd like */
OsInit();
- config_init();
if(serverGeneration == 1)
{
CreateWellKnownSockets();
@@ -254,6 +255,7 @@ int main(int argc, char *argv[], char *envp[])
InitRootWindow(WindowTable[i]);
InitCoreDevices();
+ config_init();
InitInput(argc, argv);
InitAndStartDevices();
diff --git a/xorg-server/exa/exa.c b/xorg-server/exa/exa.c
index 023288c12..b3c5bfffe 100644
--- a/xorg-server/exa/exa.c
+++ b/xorg-server/exa/exa.c
@@ -283,7 +283,7 @@ exaGetOffscreenPixmap (DrawablePtr pDrawable, int *xp, int *yp)
}
/**
- * Returns TRUE if pixmap can be accessed offscreen.
+ * Returns TRUE if the pixmap GPU copy is being accessed.
*/
Bool
ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
@@ -291,7 +291,7 @@ ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
ScreenPtr pScreen = pPixmap->drawable.pScreen;
ExaScreenPriv (pScreen);
ExaPixmapPriv(pPixmap);
- Bool has_gpu_copy;
+ Bool has_gpu_copy, ret;
int i;
if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS))
@@ -304,7 +304,7 @@ ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) {
if (pExaScr->access[i].pixmap == pPixmap) {
pExaScr->access[i].count++;
- return TRUE;
+ return pExaScr->access[i].retval;
}
}
@@ -323,29 +323,33 @@ ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
- if (has_gpu_copy && pExaPixmap->fb_ptr)
+ if (has_gpu_copy && pExaPixmap->fb_ptr) {
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
- else
+ ret = TRUE;
+ } else {
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
+ ret = FALSE;
+ }
/* Store so we can handle repeated / nested calls. */
pExaScr->access[index].pixmap = pPixmap;
pExaScr->access[index].count = 1;
if (!has_gpu_copy)
- return FALSE;
+ goto out;
exaWaitSync (pScreen);
if (pExaScr->info->PrepareAccess == NULL)
- return TRUE;
+ goto out;
if (index >= EXA_PREPARE_AUX_DEST &&
!(pExaScr->info->flags & EXA_SUPPORTS_PREPARE_AUX)) {
if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED)
FatalError("Unsupported AUX indices used on a pinned pixmap.\n");
exaMoveOutPixmap (pPixmap);
- return FALSE;
+ ret = FALSE;
+ goto out;
}
if (!(*pExaScr->info->PrepareAccess) (pPixmap, index)) {
@@ -353,11 +357,15 @@ ExaDoPrepareAccess(PixmapPtr pPixmap, int index)
!(pExaScr->info->flags & EXA_MIXED_PIXMAPS))
FatalError("Driver failed PrepareAccess on a pinned pixmap.\n");
exaMoveOutPixmap (pPixmap);
-
- return FALSE;
+ ret = FALSE;
+ goto out;
}
- return TRUE;
+ ret = TRUE;
+
+out:
+ pExaScr->access[index].retval = ret;
+ return ret;
}
/**
diff --git a/xorg-server/exa/exa_mixed.c b/xorg-server/exa/exa_mixed.c
index 764c7dd58..155ed47c5 100644
--- a/xorg-server/exa/exa_mixed.c
+++ b/xorg-server/exa/exa_mixed.c
@@ -135,17 +135,53 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth,
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
}
- if (pExaPixmap->driverPriv) {
- if (width > 0 && height > 0 && bitsPerPixel > 0) {
+ has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
+
+ if (width <= 0)
+ width = pPixmap->drawable.width;
+
+ if (height <= 0)
+ height = pPixmap->drawable.height;
+
+ if (bitsPerPixel <= 0) {
+ if (depth <= 0)
+ bitsPerPixel = pPixmap->drawable.bitsPerPixel;
+ else
+ bitsPerPixel = BitsPerPixel(depth);
+ }
+
+ if (depth <= 0)
+ depth = pPixmap->drawable.depth;
+
+ if (width != pPixmap->drawable.width ||
+ height != pPixmap->drawable.height ||
+ depth != pPixmap->drawable.depth ||
+ bitsPerPixel != pPixmap->drawable.bitsPerPixel) {
+ if (pExaPixmap->driverPriv) {
exaSetFbPitch(pExaScr, pExaPixmap,
width, height, bitsPerPixel);
exaSetAccelBlock(pExaScr, pExaPixmap,
width, height, bitsPerPixel);
+ REGION_EMPTY(pScreen, &pExaPixmap->validFB);
}
+
+ /* Need to re-create system copy if there's also a GPU copy */
+ if (has_gpu_copy && pExaPixmap->sys_ptr) {
+ free(pExaPixmap->sys_ptr);
+ pExaPixmap->sys_ptr = NULL;
+ pExaPixmap->sys_pitch = devKind > 0 ? devKind :
+ PixmapBytePad(width, depth);
+ DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage);
+ DamageDestroy(pExaPixmap->pDamage);
+ pExaPixmap->pDamage = NULL;
+ REGION_EMPTY(pScreen, &pExaPixmap->validSys);
+
+ if (pExaScr->deferred_mixed_pixmap == pPixmap)
+ pExaScr->deferred_mixed_pixmap = NULL;
+ }
}
- has_gpu_copy = exaPixmapHasGpuCopy(pPixmap);
if (has_gpu_copy) {
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
pPixmap->devKind = pExaPixmap->fb_pitch;
diff --git a/xorg-server/exa/exa_priv.h b/xorg-server/exa/exa_priv.h
index 69c0d241d..085235524 100644
--- a/xorg-server/exa/exa_priv.h
+++ b/xorg-server/exa/exa_priv.h
@@ -194,6 +194,7 @@ typedef struct {
struct {
PixmapPtr pixmap;
int count;
+ Bool retval;
} access[EXA_NUM_PREPARE_INDICES];
/* Holds information on fallbacks that cannot be relayed otherwise. */
diff --git a/xorg-server/fb/fb.h b/xorg-server/fb/fb.h
index c35e7654b..02d6c0372 100644
--- a/xorg-server/fb/fb.h
+++ b/xorg-server/fb/fb.h
@@ -700,38 +700,41 @@ typedef struct {
#define __fbPixOffXPix(pPix) (__fbPixDrawableX(pPix))
#define __fbPixOffYPix(pPix) (__fbPixDrawableY(pPix))
-#define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
- PixmapPtr _pPix; \
- if ((pDrawable)->type != DRAWABLE_PIXMAP) { \
- _pPix = fbGetWindowPixmap(pDrawable); \
- (xoff) = __fbPixOffXWin(_pPix); \
- (yoff) = __fbPixOffYWin(_pPix); \
- } else { \
- _pPix = (PixmapPtr) (pDrawable); \
- (xoff) = __fbPixOffXPix(_pPix); \
- (yoff) = __fbPixOffYPix(_pPix); \
- } \
- fbPrepareAccess(pDrawable); \
- (pointer) = (FbBits *) _pPix->devPrivate.ptr; \
- (stride) = ((int) _pPix->devKind) / sizeof (FbBits); (void)(stride); \
- (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
+#define fbGetDrawablePixmap(pDrawable, pixmap, xoff, yoff) { \
+ if ((pDrawable)->type != DRAWABLE_PIXMAP) { \
+ (pixmap) = fbGetWindowPixmap(pDrawable); \
+ (xoff) = __fbPixOffXWin(pixmap); \
+ (yoff) = __fbPixOffYWin(pixmap); \
+ } else { \
+ (pixmap) = (PixmapPtr) (pDrawable); \
+ (xoff) = __fbPixOffXPix(pixmap); \
+ (yoff) = __fbPixOffYPix(pixmap); \
+ } \
+ fbPrepareAccess(pDrawable); \
}
-#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
- PixmapPtr _pPix; \
- if ((pDrawable)->type != DRAWABLE_PIXMAP) { \
- _pPix = fbGetWindowPixmap(pDrawable); \
- (xoff) = __fbPixOffXWin(_pPix); \
- (yoff) = __fbPixOffYWin(_pPix); \
- } else { \
- _pPix = (PixmapPtr) (pDrawable); \
- (xoff) = __fbPixOffXPix(_pPix); \
- (yoff) = __fbPixOffYPix(_pPix); \
- } \
- fbPrepareAccess(pDrawable); \
- (pointer) = (FbStip *) _pPix->devPrivate.ptr; \
- (stride) = ((int) _pPix->devKind) / sizeof (FbStip); (void)(stride); \
- (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
+#define fbGetPixmapBitsData(pixmap, pointer, stride, bpp) { \
+ (pointer) = (FbBits *) (pixmap)->devPrivate.ptr; \
+ (stride) = ((int) (pixmap)->devKind) / sizeof (FbBits); (void)(stride); \
+ (bpp) = (pixmap)->drawable.bitsPerPixel; (void)(bpp); \
+}
+
+#define fbGetPixmapStipData(pixmap, pointer, stride, bpp) { \
+ (pointer) = (FbStip *) (pixmap)->devPrivate.ptr; \
+ (stride) = ((int) (pixmap)->devKind) / sizeof (FbStip); (void)(stride); \
+ (bpp) = (pixmap)->drawable.bitsPerPixel; (void)(bpp); \
+}
+
+#define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
+ PixmapPtr _pPix; \
+ fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \
+ fbGetPixmapBitsData(_pPix, pointer, stride, bpp); \
+}
+
+#define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
+ PixmapPtr _pPix; \
+ fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \
+ fbGetPixmapStipData(_pPix, pointer, stride, bpp); \
}
/*
@@ -2079,9 +2082,11 @@ fbFillRegionSolid (DrawablePtr pDrawable,
FbBits xor);
extern _X_EXPORT pixman_image_t *
-image_from_pict (PicturePtr pict,
- Bool has_clip,
- Bool is_src);
+image_from_pict (PicturePtr pict,
+ Bool has_clip,
+ int *xoff,
+ int *yoff);
+
extern _X_EXPORT void free_pixman_pict (PicturePtr, pixman_image_t *);
#endif /* _FB_H_ */
diff --git a/xorg-server/fb/fbpict.c b/xorg-server/fb/fbpict.c
index 7ae3ec5fd..251754b3f 100644
--- a/xorg-server/fb/fbpict.c
+++ b/xorg-server/fb/fbpict.c
@@ -158,19 +158,24 @@ fbComposite (CARD8 op,
CARD16 height)
{
pixman_image_t *src, *mask, *dest;
+ int src_xoff, src_yoff;
+ int msk_xoff, msk_yoff;
+ int dst_xoff, dst_yoff;
- miCompositeSourceValidate (pSrc, xSrc, ySrc, width, height);
+ miCompositeSourceValidate (pSrc, xSrc - xDst, ySrc - yDst, width, height);
if (pMask)
- miCompositeSourceValidate (pMask, xMask, yMask, width, height);
+ miCompositeSourceValidate (pMask, xMask - xDst, yMask - yDst, width, height);
- src = image_from_pict (pSrc, TRUE, TRUE);
- mask = image_from_pict (pMask, TRUE, TRUE);
- dest = image_from_pict (pDst, TRUE, FALSE);
+ src = image_from_pict (pSrc, FALSE, &src_xoff, &src_yoff);
+ mask = image_from_pict (pMask, FALSE, &msk_xoff, &msk_yoff);
+ dest = image_from_pict (pDst, TRUE, &dst_xoff, &dst_yoff);
if (src && dest && !(pMask && !mask))
{
pixman_image_composite (op, src, mask, dest,
- xSrc, ySrc, xMask, yMask, xDst, yDst,
+ xSrc + src_xoff, ySrc + src_yoff,
+ xMask + msk_xoff, yMask + msk_yoff,
+ xDst + dst_xoff, yDst + dst_yoff,
width, height);
}
@@ -268,82 +273,24 @@ create_conical_gradient_image (PictGradient *gradient)
gradient->nstops);
}
-static DrawablePtr
-copy_drawable (DrawablePtr pDraw)
-{
- ScreenPtr pScreen = pDraw->pScreen;
- PixmapPtr pPixmap;
- GCPtr pGC;
- int width, height;
- ChangeGCVal gcv[2];
-
- width = pDraw->width;
- height = pDraw->height;
-
- pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, pDraw->depth, 0);
-
- if (!pPixmap)
- return NULL;
-
- pGC = GetScratchGC (pDraw->depth, pScreen);
-
- if (!pGC)
- {
- (*pScreen->DestroyPixmap) (pPixmap);
- return NULL;
- }
-
- /* First fill the pixmap with zeros */
- gcv[0].val = 0x00000000;
- gcv[1].val = IncludeInferiors;
- dixChangeGC (NullClient, pGC, GCBackground | GCSubwindowMode, NULL, gcv);
- ValidateGC ((DrawablePtr)pPixmap, pGC);
- miClearDrawable ((DrawablePtr)pPixmap, pGC);
-
- /* Then copy the window there */
- ValidateGC(&pPixmap->drawable, pGC);
- (* pGC->ops->CopyArea) (pDraw, &pPixmap->drawable, pGC, 0, 0, width, height, 0, 0);
-
- FreeScratchGC (pGC);
-
- return &pPixmap->drawable;
-}
-
-static void
-destroy_drawable (pixman_image_t *image, void *data)
-{
- DrawablePtr pDrawable = data;
- ScreenPtr pScreen = pDrawable->pScreen;
-
- pScreen->DestroyPixmap ((PixmapPtr)pDrawable);
-}
-
static pixman_image_t *
create_bits_picture (PicturePtr pict,
- Bool has_clip,
- Bool is_src)
+ Bool has_clip,
+ int *xoff,
+ int *yoff)
{
+ PixmapPtr pixmap;
FbBits *bits;
FbStride stride;
- int bpp, xoff, yoff;
+ int bpp;
pixman_image_t *image;
- DrawablePtr drawable;
-
- if (is_src && pict->pDrawable->type == DRAWABLE_WINDOW) {
- drawable = copy_drawable (pict->pDrawable);
- if (!drawable)
- return NULL;
- } else
- drawable = pict->pDrawable;
- fbGetDrawable (drawable, bits, stride, bpp, xoff, yoff);
-
- bits = (FbBits*)((CARD8*)bits +
- (drawable->y + yoff) * stride * sizeof(FbBits) +
- (drawable->x + xoff) * (bpp / 8));
+ fbGetDrawablePixmap (pict->pDrawable, pixmap, *xoff, *yoff);
+ fbGetPixmapBitsData(pixmap, bits, stride, bpp);
image = pixman_image_create_bits (
- pict->format, drawable->width, drawable->height,
+ pict->format,
+ pixmap->drawable.width, pixmap->drawable.height,
(uint32_t *)bits, stride * sizeof (FbStride));
@@ -361,59 +308,60 @@ create_bits_picture (PicturePtr pict,
#endif
#endif
+ /* pCompositeClip is undefined for source pictures, so
+ * only set the clip region for pictures with drawables
+ */
if (has_clip)
{
- if (is_src)
- {
- if (pict->clientClipType != CT_NONE)
- {
- pixman_image_set_has_client_clip (image, TRUE);
+ if (pict->clientClipType != CT_NONE)
+ pixman_image_set_has_client_clip (image, TRUE);
- pixman_region_translate (pict->clientClip,
- pict->clipOrigin.x,
- pict->clipOrigin.y);
-
- pixman_image_set_clip_region (image, pict->clientClip);
+ if (*xoff || *yoff)
+ pixman_region_translate (pict->pCompositeClip, *xoff, *yoff);
- pixman_region_translate (pict->clientClip,
- - pict->clipOrigin.x,
- - pict->clipOrigin.y);
- }
- }
- else
- {
- pixman_region_translate (pict->pCompositeClip,
- - pict->pDrawable->x,
- - pict->pDrawable->y);
+ pixman_image_set_clip_region (image, pict->pCompositeClip);
- pixman_image_set_clip_region (image, pict->pCompositeClip);
-
- pixman_region_translate (pict->pCompositeClip,
- pict->pDrawable->x,
- pict->pDrawable->y);
- }
+ if (*xoff || *yoff)
+ pixman_region_translate (pict->pCompositeClip, -*xoff, -*yoff);
}
/* Indexed table */
if (pict->pFormat->index.devPrivate)
pixman_image_set_indexed (image, pict->pFormat->index.devPrivate);
- if (drawable != pict->pDrawable)
- pixman_image_set_destroy_function (image, destroy_drawable, drawable);
-
+ /* Add in drawable origin to position within the image */
+ *xoff += pict->pDrawable->x;
+ *yoff += pict->pDrawable->y;
+
return image;
}
static void
-set_image_properties (pixman_image_t *image, PicturePtr pict)
+set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
{
pixman_repeat_t repeat;
pixman_filter_t filter;
if (pict->transform)
{
- pixman_image_set_transform (
- image, (pixman_transform_t *)pict->transform);
+ /* For source images, adjust the transform to account
+ * for the drawable offset within the pixman image,
+ * then set the offset to 0 as it will be used
+ * to compute positions within the transformed image.
+ */
+ if (!has_clip) {
+ struct pixman_transform adjusted;
+
+ adjusted = *pict->transform;
+ pixman_transform_translate(&adjusted,
+ NULL,
+ pixman_int_to_fixed(*xoff),
+ pixman_int_to_fixed(*yoff));
+ pixman_image_set_transform (image, &adjusted);
+ *xoff = 0;
+ *yoff = 0;
+ } else
+ pixman_image_set_transform (image, pict->transform);
}
switch (pict->repeatType)
@@ -440,7 +388,8 @@ set_image_properties (pixman_image_t *image, PicturePtr pict)
if (pict->alphaMap)
{
- pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, TRUE, TRUE);
+ int alpha_xoff, alpha_yoff;
+ pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, FALSE, &alpha_xoff, &alpha_yoff);
pixman_image_set_alpha_map (
image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y);
@@ -473,9 +422,7 @@ set_image_properties (pixman_image_t *image, PicturePtr pict)
}
pixman_image_t *
-image_from_pict (PicturePtr pict,
- Bool has_clip,
- Bool is_src)
+image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
{
pixman_image_t *image = NULL;
@@ -484,7 +431,7 @@ image_from_pict (PicturePtr pict,
if (pict->pDrawable)
{
- image = create_bits_picture (pict, has_clip, is_src);
+ image = create_bits_picture (pict, has_clip, xoff, yoff);
}
else if (pict->pSourcePict)
{
@@ -508,7 +455,7 @@ image_from_pict (PicturePtr pict,
}
if (image)
- set_image_properties (image, pict);
+ set_image_properties (image, pict, has_clip, xoff, yoff);
return image;
}
diff --git a/xorg-server/fb/fbtrap.c b/xorg-server/fb/fbtrap.c
index b1e1eff4a..515e2e1c1 100644
--- a/xorg-server/fb/fbtrap.c
+++ b/xorg-server/fb/fbtrap.c
@@ -40,7 +40,8 @@ fbAddTraps (PicturePtr pPicture,
int ntrap,
xTrap *traps)
{
- pixman_image_t *image = image_from_pict (pPicture, FALSE, FALSE);
+ int image_xoff, image_yoff;
+ pixman_image_t *image = image_from_pict (pPicture, FALSE, &image_xoff, &image_yoff);
if (!image)
return;
@@ -56,7 +57,8 @@ fbRasterizeTrapezoid (PicturePtr pPicture,
int x_off,
int y_off)
{
- pixman_image_t *image = image_from_pict (pPicture, FALSE, FALSE);
+ int mask_xoff, mask_yoff;
+ pixman_image_t *image = image_from_pict (pPicture, FALSE, &mask_xoff, &mask_yoff);
if (!image)
return;
diff --git a/xorg-server/hw/xfree86/common/xf86Configure.c b/xorg-server/hw/xfree86/common/xf86Configure.c
index 2df6b4ec3..d74d90bdd 100644
--- a/xorg-server/hw/xfree86/common/xf86Configure.c
+++ b/xorg-server/hw/xfree86/common/xf86Configure.c
@@ -577,7 +577,6 @@ static void handle_detailed_input(struct detailed_monitor_section *det_mon,
static XF86ConfMonitorPtr
configureDDCMonitorSection (int screennum)
{
- int i = 0;
int len, mon_width, mon_height;
#define displaySizeMaxLen 80
char displaySize_string[displaySizeMaxLen];
diff --git a/xorg-server/hw/xquartz/mach-startup/stub.c b/xorg-server/hw/xquartz/mach-startup/stub.c
index c8686e78f..89f9e1058 100644
--- a/xorg-server/hw/xquartz/mach-startup/stub.c
+++ b/xorg-server/hw/xquartz/mach-startup/stub.c
@@ -232,8 +232,9 @@ int main(int argc, char **argv, char **envp) {
kr = bootstrap_look_up(bootstrap_port, server_bootstrap_name, &mp);
if(kr != KERN_SUCCESS) {
- fprintf(stderr, "Xquartz: Unable to locate waiting server: %s\n", server_bootstrap_name);
pid_t child;
+
+ fprintf(stderr, "Xquartz: Unable to locate waiting server: %s\n", server_bootstrap_name);
set_x11_path();
/* This forking is ugly and will be cleaned up later */
diff --git a/xorg-server/hw/xquartz/pbproxy/Makefile.am b/xorg-server/hw/xquartz/pbproxy/Makefile.am
index e1c537fbb..02da6b265 100644
--- a/xorg-server/hw/xquartz/pbproxy/Makefile.am
+++ b/xorg-server/hw/xquartz/pbproxy/Makefile.am
@@ -15,6 +15,9 @@ if STANDALONE_XPBPROXY
bin_PROGRAMS = xpbproxy
xpbproxy_SOURCES = app-main.m
xpbproxy_LDADD = libxpbproxy.la
+xpbproxy_LDFLAGS = -Wl,-framework,Cocoa
+
+AM_CPPFLAGS += -DSTANDALONE_XPBPROXY
endif
diff --git a/xorg-server/miext/rootless/rootlessScreen.c b/xorg-server/miext/rootless/rootlessScreen.c
index c73d5170b..7a799d98c 100644
--- a/xorg-server/miext/rootless/rootlessScreen.c
+++ b/xorg-server/miext/rootless/rootlessScreen.c
@@ -431,7 +431,7 @@ RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst,
register WindowPtr pChild;
Bool anyMarked = FALSE;
- void (* MarkWindow)() = pScreen->MarkWindow;
+ MarkWindowProcPtr MarkWindow = pScreen->MarkWindow;
RL_DEBUG_MSG("is top level! ");
/* single layered systems are easy */
diff --git a/xorg-server/os/backtrace.c b/xorg-server/os/backtrace.c
index dafb9904b..7ca6dab6d 100644
--- a/xorg-server/os/backtrace.c
+++ b/xorg-server/os/backtrace.c
@@ -48,10 +48,10 @@ void xorg_backtrace(void)
mod = (info.dli_fname && *info.dli_fname) ? info.dli_fname : "(vdso)";
if (info.dli_saddr)
ErrorF("%d: %s (%s+0x%lx) [%p]\n", i, mod,
- info.dli_sname, (char *) array[i] - (char *) info.dli_saddr, array[i]);
+ info.dli_sname, (long unsigned int)((char *) array[i] - (char *) info.dli_saddr), array[i]);
else
ErrorF("%d: %s (%p+0x%lx) [%p]\n", i, mod,
- info.dli_fbase, (char *) array[i] - (char *) info.dli_fbase, array[i]);
+ info.dli_fbase, (long unsigned int)((char *) array[i] - (char *) info.dli_fbase), array[i]);
}
}
diff --git a/xorg-server/record/set.c b/xorg-server/record/set.c
index 453452ec6..f0e094eed 100644
--- a/xorg-server/record/set.c
+++ b/xorg-server/record/set.c
@@ -406,10 +406,7 @@ _RecordSetMemoryRequirements(RecordSetInterval *pIntervals, int nIntervals,
/* user-visible functions */
int
-RecordSetMemoryRequirements(pIntervals, nIntervals, alignment)
- RecordSetInterval *pIntervals;
- int nIntervals;
- int *alignment;
+RecordSetMemoryRequirements(RecordSetInterval *pIntervals, int nIntervals, int *alignment)
{
RecordCreateSetProcPtr pCreateSet;
return _RecordSetMemoryRequirements(pIntervals, nIntervals, alignment,
@@ -417,11 +414,7 @@ RecordSetMemoryRequirements(pIntervals, nIntervals, alignment)
}
RecordSetPtr
-RecordCreateSet(pIntervals, nIntervals, pMem, memsize)
- RecordSetInterval *pIntervals;
- int nIntervals;
- void *pMem;
- int memsize;
+RecordCreateSet(RecordSetInterval *pIntervals, int nIntervals, void *pMem, int memsize)
{
RecordCreateSetProcPtr pCreateSet;
int alignment;
diff --git a/xorg-server/xkb/xkb.c b/xorg-server/xkb/xkb.c
index 98e879ddb..35f8d1cbd 100644
--- a/xorg-server/xkb/xkb.c
+++ b/xorg-server/xkb/xkb.c
@@ -3273,20 +3273,21 @@ _XkbFindNamedIndicatorMap(XkbSrvLedInfoPtr sli, Atom indicator,
int *led_return)
{
XkbIndicatorMapPtr map;
- int led;
/* search for the right indicator */
map = NULL;
if (sli->names && sli->maps) {
+ int led;
+
for (led = 0; (led < XkbNumIndicators) && (map == NULL); led++) {
if (sli->names[led] == indicator) {
map= &sli->maps[led];
+ *led_return = led;
break;
}
}
}
- *led_return = led;
return map;
}
@@ -4298,9 +4299,12 @@ ProcXkbSetNames(ClientPtr client)
static char *
XkbWriteCountedString(char *wire,char *str,Bool swap)
{
-CARD16 len,*pLen;
+ CARD16 len,*pLen;
+
+ if (!str)
+ return wire;
- len= (str?strlen(str):0);
+ len= strlen(str);
pLen= (CARD16 *)wire;
*pLen= len;
if (swap) {
diff --git a/xorg-server/xkb/xkbLEDs.c b/xorg-server/xkb/xkbLEDs.c
index 59cdba416..6ca80d784 100644
--- a/xorg-server/xkb/xkbLEDs.c
+++ b/xorg-server/xkb/xkbLEDs.c
@@ -745,12 +745,14 @@ XkbFlushLedEvents( DeviceIntPtr dev,
XkbDDXAccessXBeep(dev, _BEEP_LED_OFF, XkbAccessXFeedbackMask);
}
}
- if (ed && (ed->reason)) {
- if ((dev!=kbd)&&(ed->reason&XkbXI_IndicatorStateMask))
- XkbDDXUpdateDeviceIndicators(dev,sli,sli->effectiveState);
- XkbSendExtensionDeviceNotify(dev,cause->client,ed);
+ if (ed) {
+ if (ed->reason) {
+ if ((dev!=kbd)&&(ed->reason&XkbXI_IndicatorStateMask))
+ XkbDDXUpdateDeviceIndicators(dev,sli,sli->effectiveState);
+ XkbSendExtensionDeviceNotify(dev,cause->client,ed);
+ }
+ bzero((char *)ed,sizeof(XkbExtensionDeviceNotify));
}
- bzero((char *)ed,sizeof(XkbExtensionDeviceNotify));
return;
}