[Xquartz-changes] xserver: Branch 'server-1.10-apple' - 21 commits
Jeremy Huddleston
jeremyhu at freedesktop.org
Tue Mar 29 00:50:17 PDT 2011
Rebased ref, commits from common ancestor:
commit d9bdaf6e8e48e57aa8296c1e3bfc611539624222
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Sat Oct 30 14:55:06 2010 -0700
configure.ac: Add -fno-strict-aliasing to CFLAGS
This should address https://bugs.freedesktop.org/show_bug.cgi?id=31238
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/configure.ac b/configure.ac
index 4a09bba..6770bf3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,6 +80,12 @@ XORG_PROG_RAWCPP
# easier overrides at build time.
XSERVER_CFLAGS='$(CWARNFLAGS)'
+dnl Explicitly add -fno-strict-aliasing since this option should disappear
+dnl from util-macros CWARNFLAGS
+if test "x$GCC" = xyes ; then
+ XSERVER_CFLAGS="$XSERVER_CFLAGS -fno-strict-aliasing"
+fi
+
dnl Check for dtrace program (needed to build Xserver dtrace probes)
dnl Also checks for <sys/sdt.h>, since some Linux distros have an
dnl ISDN trace program named dtrace
commit 6bda999045d7f69f6f60298e5f4a889bbadac399
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Fri Feb 12 19:48:52 2010 -0800
fb: Revert fb changes that broke XQuartz
http://bugs.freedesktop.org/show_bug.cgi?id=26124
Revert "Fix source pictures getting random transforms after 2d6a8f668342a5190cdf43b5."
Revert "fb: Adjust transform or composite coordinates for pixman operations"
http://bugs.freedesktop.org/26124
This reverts commit a72c65e9176c51de95db2fdbf4c5d946a4911695.
This reverts commit a6bd5d2e482a5aa84acb3d4932e2a166d8670ef1.
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/fb/fb.h b/fb/fb.h
index 021a940..0b248e1 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -2079,11 +2079,8 @@ fbFillRegionSolid (DrawablePtr pDrawable,
FbBits xor);
extern _X_EXPORT pixman_image_t *
-image_from_pict (PicturePtr pict,
- Bool has_clip,
- int *xoff,
- int *yoff);
-
+image_from_pict (PicturePtr pict,
+ Bool has_clip);
extern _X_EXPORT void free_pixman_pict (PicturePtr, pixman_image_t *);
#endif /* _FB_H_ */
diff --git a/fb/fbpict.c b/fb/fbpict.c
index 7636040..af1920b 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -50,24 +50,19 @@ 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 - xDst, ySrc - yDst, width, height);
if (pMask)
miCompositeSourceValidate (pMask, xMask - xDst, yMask - yDst, width, height);
- 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);
+ src = image_from_pict (pSrc, TRUE);
+ mask = image_from_pict (pMask, TRUE);
+ dest = image_from_pict (pDst, TRUE);
if (src && dest && !(pMask && !mask))
{
pixman_image_composite (op, src, mask, dest,
- xSrc + src_xoff, ySrc + src_yoff,
- xMask + msk_xoff, yMask + msk_yoff,
- xDst + dst_xoff, yDst + dst_yoff,
+ xSrc, ySrc, xMask, yMask, xDst, yDst,
width, height);
}
@@ -146,22 +141,22 @@ create_conical_gradient_image (PictGradient *gradient)
static pixman_image_t *
create_bits_picture (PicturePtr pict,
- Bool has_clip,
- int *xoff,
- int *yoff)
+ Bool has_clip)
{
- PixmapPtr pixmap;
FbBits *bits;
FbStride stride;
- int bpp;
+ int bpp, xoff, yoff;
pixman_image_t *image;
- fbGetDrawablePixmap (pict->pDrawable, pixmap, *xoff, *yoff);
- fbGetPixmapBitsData(pixmap, bits, stride, bpp);
+ fbGetDrawable (pict->pDrawable, bits, stride, bpp, xoff, yoff);
+
+ bits = (FbBits*)((CARD8*)bits +
+ (pict->pDrawable->y + yoff) * stride * sizeof(FbBits) +
+ (pict->pDrawable->x + xoff) * (bpp / 8));
image = pixman_image_create_bits (
pict->format,
- pixmap->drawable.width, pixmap->drawable.height,
+ pict->pDrawable->width, pict->pDrawable->height,
(uint32_t *)bits, stride * sizeof (FbStride));
@@ -187,55 +182,33 @@ create_bits_picture (PicturePtr pict,
if (pict->clientClipType != CT_NONE)
pixman_image_set_has_client_clip (image, TRUE);
- if (*xoff || *yoff)
- pixman_region_translate (pict->pCompositeClip, *xoff, *yoff);
+ pixman_region_translate (pict->pCompositeClip, - pict->pDrawable->x, - pict->pDrawable->y);
pixman_image_set_clip_region (image, pict->pCompositeClip);
- if (*xoff || *yoff)
- pixman_region_translate (pict->pCompositeClip, -*xoff, -*yoff);
+ pixman_region_translate (pict->pCompositeClip, pict->pDrawable->x, pict->pDrawable->y);
}
/* Indexed table */
if (pict->pFormat->index.devPrivate)
pixman_image_set_indexed (image, pict->pFormat->index.devPrivate);
- /* Add in drawable origin to position within the image */
- *xoff += pict->pDrawable->x;
- *yoff += pict->pDrawable->y;
-
return image;
}
static pixman_image_t *
-image_from_pict_internal (PicturePtr pict, Bool has_clip, int *xoff, int *yoff, Bool is_alpha_map);
+image_from_pict_internal (PicturePtr pict, Bool has_clip, Bool is_alpha_map);
static void
-set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int *xoff, int *yoff, Bool is_alpha_map)
+set_image_properties (pixman_image_t *image, PicturePtr pict, Bool is_alpha_map)
{
pixman_repeat_t repeat;
pixman_filter_t filter;
if (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);
+ pixman_image_set_transform (
+ image, (pixman_transform_t *)pict->transform);
}
switch (pict->repeatType)
@@ -265,8 +238,7 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
*/
if (pict->alphaMap && !is_alpha_map)
{
- int alpha_xoff, alpha_yoff;
- pixman_image_t *alpha_map = image_from_pict_internal (pict->alphaMap, FALSE, &alpha_xoff, &alpha_yoff, TRUE);
+ pixman_image_t *alpha_map = image_from_pict_internal (pict->alphaMap, TRUE, TRUE);
pixman_image_set_alpha_map (
image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y);
@@ -299,7 +271,8 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int
}
static pixman_image_t *
-image_from_pict_internal (PicturePtr pict, Bool has_clip, int *xoff, int *yoff, Bool is_alpha_map)
+image_from_pict_internal (PicturePtr pict,
+ Bool has_clip, Bool is_alpha_map)
{
pixman_image_t *image = NULL;
@@ -308,7 +281,7 @@ image_from_pict_internal (PicturePtr pict, Bool has_clip, int *xoff, int *yoff,
if (pict->pDrawable)
{
- image = create_bits_picture (pict, has_clip, xoff, yoff);
+ image = create_bits_picture (pict, has_clip);
}
else if (pict->pSourcePict)
{
@@ -329,19 +302,18 @@ image_from_pict_internal (PicturePtr pict, Bool has_clip, int *xoff, int *yoff,
else if (sp->type == SourcePictTypeConical)
image = create_conical_gradient_image (gradient);
}
- *xoff = *yoff = 0;
}
if (image)
- set_image_properties (image, pict, has_clip, xoff, yoff, is_alpha_map);
+ set_image_properties (image, pict, is_alpha_map);
return image;
}
pixman_image_t *
-image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff)
+image_from_pict (PicturePtr pict, Bool has_clip)
{
- return image_from_pict_internal (pict, has_clip, xoff, yoff, FALSE);
+ return image_from_pict_internal (pict, has_clip, FALSE);
}
void
diff --git a/fb/fbtrap.c b/fb/fbtrap.c
index c309ceb..40cffd9 100644
--- a/fb/fbtrap.c
+++ b/fb/fbtrap.c
@@ -37,8 +37,7 @@ fbAddTraps (PicturePtr pPicture,
int ntrap,
xTrap *traps)
{
- int image_xoff, image_yoff;
- pixman_image_t *image = image_from_pict (pPicture, FALSE, &image_xoff, &image_yoff);
+ pixman_image_t *image = image_from_pict (pPicture, FALSE);
if (!image)
return;
@@ -54,8 +53,7 @@ fbRasterizeTrapezoid (PicturePtr pPicture,
int x_off,
int y_off)
{
- int mask_xoff, mask_yoff;
- pixman_image_t *image = image_from_pict (pPicture, FALSE, &mask_xoff, &mask_yoff);
+ pixman_image_t *image = image_from_pict (pPicture, FALSE);
if (!image)
return;
commit 7c5fd8f9938c565112170837ee0cd1b2040dcd41
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Fri Apr 30 13:08:25 2010 -0700
Workaround the GC clipping problem in miPaintWindow and add some debugging output.
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/mi/miexpose.c b/mi/miexpose.c
index 94258b8..4f25c23 100644
--- a/mi/miexpose.c
+++ b/mi/miexpose.c
@@ -521,6 +521,7 @@ void RootlessSetPixmapOfAncestors(WindowPtr pWin);
void RootlessStartDrawing(WindowPtr pWin);
void RootlessDamageRegion(WindowPtr pWin, RegionPtr prgn);
Bool IsFramedWindow(WindowPtr pWin);
+#include "../fb/fb.h"
#endif
void
@@ -548,24 +549,37 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
Bool solid = TRUE;
DrawablePtr drawable = &pWin->drawable;
+#ifdef XQUARTZ_CLIP_DEBUG
+ ErrorF("START %d BS %d (pR = %ld)\n", what, pWin->backgroundState, ParentRelative);
+ ErrorF(" Rgn: %d %d %d %d\n", prgn->extents.x1, prgn->extents.y1,
+ prgn->extents.x2 - prgn->extents.x1,
+ prgn->extents.y2 - prgn->extents.y1);
+ ErrorF(" Win: %d %d (%d %d) %d %d\n", pWin->origin.x, pWin->origin.y,
+ pWin->winSize.extents.x1, pWin->winSize.extents.y1,
+ pWin->winSize.extents.x2 - pWin->winSize.extents.x1,
+ pWin->winSize.extents.y2 - pWin->winSize.extents.y1);
+ ErrorF(" Draw: %d %d %d %d\n", pWin->drawable.x, pWin->drawable.y,
+ pWin->drawable.width, pWin->drawable.height);
+#endif
+
#ifdef ROOTLESS
if(!drawable || drawable->type == UNDRAWABLE_WINDOW)
return;
-
- if(IsFramedWindow(pWin)) {
- RootlessStartDrawing(pWin);
- RootlessDamageRegion(pWin, prgn);
-
- if(pWin->backgroundState == ParentRelative) {
- if((what == PW_BACKGROUND) ||
- (what == PW_BORDER && !pWin->borderIsPixel))
- RootlessSetPixmapOfAncestors(pWin);
- }
- }
#endif
if (what == PW_BACKGROUND)
{
+#ifdef ROOTLESS
+ if(IsFramedWindow(pWin)) {
+ RootlessStartDrawing(pWin);
+ RootlessDamageRegion(pWin, prgn);
+
+ if(pWin->backgroundState == ParentRelative) {
+ RootlessSetPixmapOfAncestors(pWin);
+ }
+ }
+#endif
+
while (pWin->backgroundState == ParentRelative)
pWin = pWin->parent;
@@ -587,6 +601,18 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
{
PixmapPtr pixmap;
+#ifdef ROOTLESS
+ if(IsFramedWindow(pWin)) {
+ RootlessStartDrawing(pWin);
+ RootlessDamageRegion(pWin, prgn);
+
+ if(!pWin->borderIsPixel &&
+ pWin->backgroundState == ParentRelative) {
+ RootlessSetPixmapOfAncestors(pWin);
+ }
+ }
+#endif
+
tile_x_off = drawable->x;
tile_y_off = drawable->y;
@@ -595,6 +621,12 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
return;
pixmap = (*pScreen->GetWindowPixmap) ((WindowPtr) drawable);
drawable = &pixmap->drawable;
+
+#ifdef XQUARTZ_CLIP_DEBUG
+ ErrorF(" Draw: %d %d %d %d\n",
+ drawable->x, drawable->y, drawable->width, drawable->height);
+#endif
+
#ifdef COMPOSITE
draw_x_off = pixmap->screen_x;
draw_y_off = pixmap->screen_y;
@@ -657,6 +689,57 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
ChangeGC (NullClient, pGC, gcmask, gcval);
ValidateGC (drawable, pGC);
+#ifdef XQUARTZ_CLIP_DEBUG
+ ErrorF(" GC: %d %d %d %d\n",
+ pGC->pCompositeClip->extents.x1, pGC->pCompositeClip->extents.y1,
+ pGC->pCompositeClip->extents.x2 - pGC->pCompositeClip->extents.x1,
+ pGC->pCompositeClip->extents.y2 - pGC->pCompositeClip->extents.y1);
+#endif
+
+#ifdef XQUARTZ
+ /* Looks like our clipping isn't set right for some reason:
+ * http://xquartz.macosforge.org/trac/ticket/290
+ */
+ if(what == PW_BORDER) {
+
+#if 0
+ if(solid) {
+#if 1
+ fbFillRegionSolid(&pWin->drawable,
+ prgn,
+ 0,
+ fbReplicatePixel(fill.pixel,
+ pWin->drawable.bitsPerPixel));
+#else
+ fbFillRegionSolid(drawable,
+ prgn,
+ 0,
+ fbReplicatePixel(fill.pixel,
+ drawable->bitsPerPixel));
+#endif
+ return;
+ }
+#endif
+
+ pGC->pCompositeClip->extents.x1 += prgn->extents.x1;
+ pGC->pCompositeClip->extents.y1 += prgn->extents.y1;
+ pGC->pCompositeClip->extents.x2 += prgn->extents.x1;
+ pGC->pCompositeClip->extents.y2 += prgn->extents.y1;
+
+ if(pGC->pCompositeClip->extents.x2 > drawable->pScreen->width)
+ pGC->pCompositeClip->extents.x2 = drawable->pScreen->width;
+ if(pGC->pCompositeClip->extents.y2 > drawable->pScreen->height)
+ pGC->pCompositeClip->extents.y2 = drawable->pScreen->height;
+ }
+#endif
+
+#ifdef XQUARTZ_CLIP_DEBUG
+ ErrorF(" GC: %d %d %d %d\n",
+ pGC->pCompositeClip->extents.x1, pGC->pCompositeClip->extents.y1,
+ pGC->pCompositeClip->extents.x2 - pGC->pCompositeClip->extents.x1,
+ pGC->pCompositeClip->extents.y2 - pGC->pCompositeClip->extents.y1);
+#endif
+
numRects = RegionNumRects(prgn);
pbox = RegionRects(prgn);
for (i= numRects; --i >= 0; pbox++, prect++)
commit c75637877372c74ae20fdd8f51c5fd68a629f4ac
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Mon Mar 28 23:32:06 2011 -0700
configure.ac: 1.10.0.901 (1.10.1 RC1)
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/configure.ac b/configure.ac
index 61224b6..4a09bba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.10.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2011-2-25"
+AC_INIT([xorg-server], 1.10.0.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2011-03-29"
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
commit d3992dbe586f873a089fca25846ca08a85708352
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Mon Mar 28 23:31:18 2011 -0700
hw/dmx/doc: Update list of doxygen-generated files
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/hw/dmx/doc/Makefile.am b/hw/dmx/doc/Makefile.am
index 8e73602..f6d2b97 100644
--- a/hw/dmx/doc/Makefile.am
+++ b/hw/dmx/doc/Makefile.am
@@ -32,12 +32,21 @@ DOXYGEN_HEAD=\
DOXYGEN_REST= \
dmx.txt \
scaled.txt \
+ html/annotated.html \
+ html/bc_s.png \
html/ChkNotMaskEv_8c.html \
html/ChkNotMaskEv_8h.html \
html/ChkNotMaskEv_8h_source.html \
html/classes.html \
+ html/closed.png \
+ html/dmx-config_8h.html \
+ html/dmx-config_8h_source.html \
+ html/dmx_8c.html \
html/dmx_8h.html \
html/dmx_8h_source.html \
+ html/dmx__glxvisuals_8c.html \
+ html/dmx__glxvisuals_8h.html \
+ html/dmx__glxvisuals_8h_source.html \
html/dmxarg_8c.html \
html/dmxarg_8h.html \
html/dmxarg_8h_source.html \
@@ -89,7 +98,6 @@ DOXYGEN_REST= \
html/dmxgcops_8c.html \
html/dmxgcops_8h.html \
html/dmxgcops_8h_source.html \
- html/dmx__glxvisuals_8h_source.html \
html/dmxinit_8c.html \
html/dmxinit_8h.html \
html/dmxinit_8h_source.html \
@@ -138,6 +146,7 @@ DOXYGEN_REST= \
html/dmxsync_8c.html \
html/dmxsync_8h.html \
html/dmxsync_8h_source.html \
+ html/dmxtodmx_8c.html \
html/dmxvisual_8c.html \
html/dmxvisual_8h.html \
html/dmxvisual_8h_source.html \
@@ -159,17 +168,119 @@ DOXYGEN_REST= \
html/ftv2node.png \
html/ftv2plastnode.png \
html/ftv2pnode.png \
+ html/ftv2splitbar.png \
html/ftv2vertline.png \
html/functions.html \
+ html/functions_0x62.html \
+ html/functions_0x63.html \
+ html/functions_0x64.html \
+ html/functions_0x65.html \
+ html/functions_0x66.html \
+ html/functions_0x67.html \
+ html/functions_0x68.html \
+ html/functions_0x69.html \
+ html/functions_0x6b.html \
+ html/functions_0x6c.html \
+ html/functions_0x6d.html \
+ html/functions_0x6e.html \
+ html/functions_0x6f.html \
+ html/functions_0x70.html \
+ html/functions_0x72.html \
+ html/functions_0x73.html \
+ html/functions_0x74.html \
+ html/functions_0x75.html \
+ html/functions_0x76.html \
+ html/functions_0x77.html \
+ html/functions_0x78.html \
+ html/functions_0x79.html \
+ html/functions_eval.html \
html/functions_vars.html \
+ html/functions_vars_0x62.html \
+ html/functions_vars_0x63.html \
+ html/functions_vars_0x64.html \
+ html/functions_vars_0x65.html \
+ html/functions_vars_0x66.html \
+ html/functions_vars_0x67.html \
+ html/functions_vars_0x68.html \
+ html/functions_vars_0x69.html \
+ html/functions_vars_0x6b.html \
+ html/functions_vars_0x6c.html \
+ html/functions_vars_0x6d.html \
+ html/functions_vars_0x6e.html \
+ html/functions_vars_0x6f.html \
+ html/functions_vars_0x70.html \
+ html/functions_vars_0x72.html \
+ html/functions_vars_0x73.html \
+ html/functions_vars_0x74.html \
+ html/functions_vars_0x75.html \
+ html/functions_vars_0x76.html \
+ html/functions_vars_0x77.html \
+ html/functions_vars_0x78.html \
+ html/functions_vars_0x79.html \
+ html/globals.html \
+ html/globals_0x61.html \
+ html/globals_0x62.html \
+ html/globals_0x63.html \
+ html/globals_0x64.html \
+ html/globals_0x65.html \
+ html/globals_0x66.html \
+ html/globals_0x67.html \
+ html/globals_0x69.html \
+ html/globals_0x6b.html \
+ html/globals_0x6c.html \
+ html/globals_0x6d.html \
+ html/globals_0x6e.html \
+ html/globals_0x6f.html \
+ html/globals_0x70.html \
+ html/globals_0x71.html \
+ html/globals_0x72.html \
+ html/globals_0x73.html \
+ html/globals_0x74.html \
+ html/globals_0x75.html \
+ html/globals_0x76.html \
+ html/globals_0x78.html \
+ html/globals_0x79.html \
html/globals_defs.html \
+ html/globals_defs_0x62.html \
+ html/globals_defs_0x63.html \
+ html/globals_defs_0x64.html \
+ html/globals_defs_0x65.html \
+ html/globals_defs_0x66.html \
+ html/globals_defs_0x67.html \
+ html/globals_defs_0x6c.html \
+ html/globals_defs_0x6d.html \
+ html/globals_defs_0x6e.html \
+ html/globals_defs_0x6f.html \
+ html/globals_defs_0x70.html \
+ html/globals_defs_0x72.html \
+ html/globals_defs_0x73.html \
+ html/globals_defs_0x74.html \
+ html/globals_defs_0x75.html \
+ html/globals_defs_0x76.html \
html/globals_enum.html \
html/globals_eval.html \
html/globals_func.html \
- html/globals.html \
+ html/globals_func_0x61.html \
+ html/globals_func_0x63.html \
+ html/globals_func_0x64.html \
+ html/globals_func_0x65.html \
+ html/globals_func_0x67.html \
+ html/globals_func_0x69.html \
+ html/globals_func_0x6b.html \
+ html/globals_func_0x6c.html \
+ html/globals_func_0x6d.html \
+ html/globals_func_0x6e.html \
+ html/globals_func_0x6f.html \
+ html/globals_func_0x70.html \
+ html/globals_func_0x73.html \
+ html/globals_func_0x75.html \
+ html/globals_func_0x76.html \
+ html/globals_func_0x78.html \
+ html/globals_func_0x79.html \
html/globals_type.html \
html/globals_vars.html \
html/index.html \
+ html/jquery.js \
html/lnx-keyboard_8c.html \
html/lnx-keyboard_8h.html \
html/lnx-keyboard_8h_source.html \
@@ -179,15 +290,18 @@ DOXYGEN_REST= \
html/lnx-ps2_8c.html \
html/lnx-ps2_8h.html \
html/lnx-ps2_8h_source.html \
- html/main.html \
+ html/nav_f.png \
+ html/nav_h.png \
+ html/navtree.css \
+ html/navtree.js \
+ html/open.png \
+ html/resize.js \
html/struct__dmxArg.html \
html/struct__dmxColormapPriv.html \
- html/structDMXConfigCmdStruct.html \
html/struct__DMXConfigComment.html \
html/struct__DMXConfigDisplay.html \
html/struct__DMXConfigEntry.html \
html/struct__DMXConfigFullDim.html \
- html/structDMXConfigListStruct.html \
html/struct__DMXConfigNumber.html \
html/struct__DMXConfigOption.html \
html/struct__DMXConfigPair.html \
@@ -199,26 +313,33 @@ DOXYGEN_REST= \
html/struct__DMXConfigVirtual.html \
html/struct__DMXConfigWall.html \
html/struct__dmxCursorPriv.html \
- html/structDMXDesktopAttributesRec.html \
html/struct__DMXEventMap.html \
html/struct__dmxFontPriv.html \
html/struct__dmxGCPriv.html \
- html/structdmxGlxVisualPrivate.html \
html/struct__dmxGlyphPriv.html \
- html/structDMXInputAttributesRec.html \
html/struct__DMXInputInfo.html \
html/struct__DMXLocalInitInfo.html \
html/struct__DMXLocalInputInfo.html \
html/struct__dmxPictPriv.html \
html/struct__dmxPixPriv.html \
- html/structDMXScreenAttributesRec.html \
html/struct__DMXScreenInfo.html \
html/struct__DMXStatAvg.html \
html/struct__DMXStatInfo.html \
- html/structDMXWindowAttributesRec.html \
html/struct__dmxWinPriv.html \
html/struct__myPrivate.html \
- html/tree.html \
+ html/structDMXConfigCmdStruct.html \
+ html/structDMXConfigListStruct.html \
+ html/structDMXDesktopAttributesRec.html \
+ html/structdmxGlxVisualPrivate.html \
+ html/structDMXInputAttributesRec.html \
+ html/structDMXScreenAttributesRec.html \
+ html/structDMXWindowAttributesRec.html \
+ html/structstack.html \
+ html/tab_a.png \
+ html/tab_b.png \
+ html/tab_h.png \
+ html/tab_s.png \
+ html/tabs.css \
html/usb-common_8c.html \
html/usb-common_8h.html \
html/usb-common_8h_source.html \
@@ -232,7 +353,9 @@ DOXYGEN_REST= \
html/usb-other_8h.html \
html/usb-other_8h_source.html \
html/usb-private_8h.html \
- html/usb-private_8h_source.html
+ html/usb-private_8h_source.html \
+ html/vdltodmx_8c.html \
+ html/xdmxconfig_8c.html
DOXYGEN_FILES=$(DOXYGEN_HEAD) $(DOXYGEN_REST)
commit c5602d16399b5abb9d67365144134728a27e1cc5
Author: Erkki Seppälä <erkki.seppala at vincit.fi>
Date: Fri Mar 18 16:35:36 2011 +0200
config: handle device change event properly
wakeup_handler in udev.c wasn't dealing with udev change events.
There are situations when a device can gain its input capabilities
after it has been added to the system and therefore the change events
must be handled as well.
The change is handled as a consecutive device removal and addition.
Signed-off-by: Erkki Seppälä <erkki.seppala at vincit.fi>
Signed-off-by: Stefan Kost <Stefan.Kost at nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
(cherry picked from commit 6243332782f2d286d49f1dec8a628b0a403665fd)
diff --git a/config/udev.c b/config/udev.c
index 678e47a..9ac34ee 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -255,6 +255,10 @@ wakeup_handler(pointer data, int err, pointer read_mask)
device_added(udev_device);
else if (!strcmp(action, "remove"))
device_removed(udev_device);
+ else if (!strcmp(action, "change")) {
+ device_removed(udev_device);
+ device_added(udev_device);
+ }
}
udev_device_unref(udev_device);
}
commit a07c07dc6c921ffb9a729f5224c9de8ff237bf54
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Fri Mar 18 11:06:57 2011 +1000
xfree86: print out which driver is about to be used.
Makes reading the log file a lot easier for those that don't magically
recognise the log spew by the individual drivers.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>
(cherry picked from commit fad10cb38ef2433c82f8a43d3b7d64e323728060)
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index e3264e6..2bac33a 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -775,6 +775,8 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
goto unwind;
}
+ xf86Msg(X_INFO, "Using input driver '%s' for '%s'\n", drv->driverName, pInfo->name);
+
if (!drv->PreInit) {
xf86Msg(X_ERROR,
"Input driver `%s' has no PreInit function (ignoring)\n",
commit 4edf97ad4f99a78d2131bef54a8692c3a35b1c97
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date: Tue Mar 22 19:01:48 2011 -0700
GLX: Support TLS with better portability
AX_TLS detects when toolchains support __thread or __declspec(thread),
but existing code assumed __thread.
This also adds a check to configure.ac to error out if TLS is requested
but unsupported.
Found-by: Tinderbox
http://tinderbox.x.org/builds/2011-03-22-0007
Regression-from: 82b1eaa6cad20f39dbf15573bdb3d62acbcd91f9
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
Reviewed-by: Tom Fogal <tfogal at alumni.unh.edu>
Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>
(cherry picked from commit c55baebf4ebf1887262cc16899eb297b9f284f6e)
diff --git a/configure.ac b/configure.ac
index 0a06391..61224b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -599,7 +599,10 @@ AC_ARG_ENABLE(aiglx, AS_HELP_STRING([--enable-aiglx], [Build accelerate
[AIGLX=yes])
AX_TLS
AC_ARG_ENABLE(glx-tls, AS_HELP_STRING([--enable-glx-tls], [Build GLX with TLS support (default: auto)]),
- [GLX_USE_TLS=$enableval],
+ [GLX_USE_TLS=$enableval
+ if test "x$GLX_USE_TLS" = "xyes" && test "${ac_cv_tls}" = "none" ; then
+ AC_MSG_ERROR([GLX with TLS support requested, but the compiler does not support it.])
+ fi],
[GLX_USE_TLS=no
if test "${ac_cv_tls}" != "none" ; then
GLX_USE_TLS=yes
diff --git a/glx/glapi.c b/glx/glapi.c
index d6a568e..d9bd04d 100644
--- a/glx/glapi.c
+++ b/glx/glapi.c
@@ -190,11 +190,11 @@ static GLint NoOpUnused(void)
/*@{*/
#if defined(GLX_USE_TLS)
-PUBLIC __thread struct _glapi_table * _glapi_tls_Dispatch
+PUBLIC TLS struct _glapi_table * _glapi_tls_Dispatch
__attribute__((tls_model("initial-exec")))
= (struct _glapi_table *) __glapi_noop_table;
-PUBLIC __thread void * _glapi_tls_Context
+PUBLIC TLS void * _glapi_tls_Context
__attribute__((tls_model("initial-exec")));
PUBLIC const struct _glapi_table *_glapi_Dispatch = NULL;
diff --git a/glx/glapi.h b/glx/glapi.h
index 8f2cf66..ab80f7e 100644
--- a/glx/glapi.h
+++ b/glx/glapi.h
@@ -83,7 +83,7 @@ typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
const extern void *_glapi_Context;
const extern struct _glapi_table *_glapi_Dispatch;
-extern __thread void * _glapi_tls_Context
+extern TLS void * _glapi_tls_Context
__attribute__((tls_model("initial-exec")));
# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_tls_Context
diff --git a/glx/glthread.h b/glx/glthread.h
index e2765ce..78f149f 100644
--- a/glx/glthread.h
+++ b/glx/glthread.h
@@ -300,7 +300,7 @@ _glthread_SetTSD(_glthread_TSD *, void *);
#if defined(GLX_USE_TLS)
-extern __thread struct _glapi_table * _glapi_tls_Dispatch
+extern TLS struct _glapi_table * _glapi_tls_Dispatch
__attribute__((tls_model("initial-exec")));
#define GET_DISPATCH() _glapi_tls_Dispatch
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 5622766..d81264d 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -441,6 +441,9 @@
/* Define to 1 if you have the `ffs' function. */
#undef HAVE_FFS
+/* If the compiler supports a TLS storage class define it to that here */
+#undef TLS
+
/* Correctly set _XSERVER64 for OSX fat binaries */
#ifdef __APPLE__
#include "dix-config-apple-verbatim.h"
commit b8e8579df592c050dfab2dc45f5004b67dbb965e
Author: Rami Ylimäki <rami.ylimaki at vincit.fi>
Date: Wed Mar 9 15:45:40 2011 +0200
xkb: Initialize pad bytes sent in replies of geometry requests.
Valgrind complains about uninitialized data being written to clients.
Reviewed-by: Erkki Seppälä <erkki.seppala at vincit.fi>
Signed-off-by: Rami Ylimäki <rami.ylimaki at vincit.fi>
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
(cherry picked from commit dc9ce695a69ca0787f58f8d160212a7a41acb703)
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 63eb46a..a8d0e80 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -4310,7 +4310,7 @@ ProcXkbSetNames(ClientPtr client)
static char *
XkbWriteCountedString(char *wire,char *str,Bool swap)
{
- CARD16 len,*pLen;
+ CARD16 len,*pLen, paddedLen;
if (!str)
return wire;
@@ -4322,8 +4322,9 @@ XkbWriteCountedString(char *wire,char *str,Bool swap)
register int n;
swaps(pLen,n);
}
- memcpy(&wire[2],str,len);
- wire+= ((2+len+3)/4)*4;
+ paddedLen= pad_to_int32(sizeof(len)+len)-sizeof(len);
+ strncpy(&wire[sizeof(len)],str,paddedLen);
+ wire+= sizeof(len)+paddedLen;
return wire;
}
@@ -4434,6 +4435,7 @@ xkbShapeWireDesc * shapeWire;
if (shape->approx!=NULL)
shapeWire->approxNdx= XkbOutlineIndex(shape,shape->approx);
else shapeWire->approxNdx= XkbNoShape;
+ shapeWire->pad= 0;
if (swap) {
register int n;
swapl(&shapeWire->name,n);
@@ -4446,6 +4448,7 @@ xkbShapeWireDesc * shapeWire;
olWire= (xkbOutlineWireDesc *)wire;
olWire->nPoints= ol->num_points;
olWire->cornerRadius= ol->corner_radius;
+ olWire->pad= 0;
wire= (char *)&olWire[1];
ptWire= (xkbPointWireDesc *)wire;
for (p=0,pt=ol->points;p<ol->num_points;p++,pt++) {
@@ -4559,6 +4562,8 @@ xkbOverlayWireDesc * olWire;
olWire= (xkbOverlayWireDesc *)wire;
olWire->name= ol->name;
olWire->nRows= ol->num_rows;
+ olWire->pad1= 0;
+ olWire->pad2= 0;
if (swap) {
register int n;
swapl(&olWire->name,n);
@@ -4571,6 +4576,7 @@ xkbOverlayWireDesc * olWire;
rowWire= (xkbOverlayRowWireDesc *)wire;
rowWire->rowUnder= row->row_under;
rowWire->nKeys= row->num_keys;
+ rowWire->pad1= 0;
wire= (char *)&rowWire[1];
for (k=0,key=row->keys;k<row->num_keys;k++,key++) {
xkbOverlayKeyWireDesc * keyWire;
commit e22497eddc54967e892fbe99f2c4239b4504daf6
Author: Rami Ylimäki <rami.ylimaki at vincit.fi>
Date: Fri Mar 11 14:30:49 2011 +0200
xkb: Release XKB component names when compiling keymap.
Reviewed-by: Erkki Seppälä <erkki.seppala at vincit.fi>
Signed-off-by: Rami Ylimäki <rami.ylimaki at vincit.fi>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
(cherry picked from commit 5c47f8beac7f87680c6f7331483b9cf94a1dbc86)
diff --git a/include/xkbsrv.h b/include/xkbsrv.h
index 9f1507e..34ef574 100644
--- a/include/xkbsrv.h
+++ b/include/xkbsrv.h
@@ -447,6 +447,11 @@ extern _X_EXPORT void XkbFreeKeyboard(
Bool /* freeDesc */
);
+extern _X_EXPORT void XkbFreeComponentNames(
+ XkbComponentNamesPtr /* names */,
+ Bool /* freeNames */
+);
+
extern _X_EXPORT void XkbSetActionKeyMods(
XkbDescPtr /* xkb */,
XkbAction * /* act */,
diff --git a/xkb/XKBAlloc.c b/xkb/XKBAlloc.c
index bffd60f..b70ac17 100644
--- a/xkb/XKBAlloc.c
+++ b/xkb/XKBAlloc.c
@@ -333,3 +333,22 @@ XkbFreeKeyboard(XkbDescPtr xkb,unsigned which,Bool freeAll)
free(xkb);
return;
}
+
+
+/***====================================================================***/
+
+void
+XkbFreeComponentNames(XkbComponentNamesPtr names, Bool freeNames)
+{
+ if (names)
+ {
+ free(names->keycodes);
+ free(names->types);
+ free(names->compat);
+ free(names->symbols);
+ free(names->geometry);
+ memset(names, 0, sizeof(XkbComponentNamesRec));
+ }
+ if (freeNames)
+ free(names);
+}
diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c
index ac587fc..a935698 100644
--- a/xkb/ddxLoad.c
+++ b/xkb/ddxLoad.c
@@ -446,23 +446,23 @@ XkbRMLVOtoKcCGST(DeviceIntPtr dev, XkbRMLVOSet *rmlvo, XkbComponentNamesPtr kccg
static XkbDescPtr
XkbCompileKeymapForDevice(DeviceIntPtr dev, XkbRMLVOSet *rmlvo, int need)
{
- XkbDescPtr xkb;
+ XkbDescPtr xkb = NULL;
unsigned int provided;
- XkbComponentNamesRec kccgst;
+ XkbComponentNamesRec kccgst = {0};
char name[PATH_MAX];
- if (!XkbRMLVOtoKcCGST(dev, rmlvo, &kccgst))
- return NULL;
-
- provided = XkbDDXLoadKeymapByNames(dev, &kccgst, XkmAllIndicesMask, need,
- &xkb, name, PATH_MAX);
- if ((need & provided) != need) {
- if (xkb) {
- XkbFreeKeyboard(xkb, 0, TRUE);
- xkb = NULL;
+ if (XkbRMLVOtoKcCGST(dev, rmlvo, &kccgst)) {
+ provided = XkbDDXLoadKeymapByNames(dev, &kccgst, XkmAllIndicesMask, need,
+ &xkb, name, PATH_MAX);
+ if ((need & provided) != need) {
+ if (xkb) {
+ XkbFreeKeyboard(xkb, 0, TRUE);
+ xkb = NULL;
+ }
}
}
+ XkbFreeComponentNames(&kccgst, FALSE);
return xkb;
}
diff --git a/xkb/xkb.c b/xkb/xkb.c
index a57139f..63eb46a 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -5897,16 +5897,7 @@ ProcXkbGetKbdByName(ClientPtr client)
XkbFreeKeyboard(new,XkbAllComponentsMask,TRUE);
new= NULL;
}
- free(names.keycodes);
- names.keycodes = NULL;
- free(names.types);
- names.types = NULL;
- free(names.compat);
- names.compat = NULL;
- free(names.symbols);
- names.symbols = NULL;
- free(names.geometry);
- names.geometry = NULL;
+ XkbFreeComponentNames(&names, FALSE);
return Success;
}
commit a96fd08b406b9955ff0d5c02f4a50f4fb2acf40e
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Tue Mar 8 14:41:21 2011 +1000
Xi: fix XI2 passive grab reply length calculation
If modifiers failed, the reply length was 4 bytes too short.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Julien Cristau <jcristau at debian.org>
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
(cherry picked from commit 33fee13361e745e1db29e250b08622c83046d488)
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index e99b6e5..4b71c68 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -194,7 +194,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
info->status = status;
info->modifiers = *modifiers;
rep.num_modifiers++;
- rep.length++;
+ rep.length += bytes_to_int32(sizeof(xXIGrabModifierInfo));
}
}
@@ -202,7 +202,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
if (rep.num_modifiers)
{
client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write;
- WriteSwappedDataToClient(client, rep.num_modifiers * 4, (char*)modifiers_failed);
+ WriteSwappedDataToClient(client, rep.length * 4, (char*)modifiers_failed);
}
free(modifiers_failed);
return ret;
commit 09f6d85b5bb49406f015ec667bb6efb3e710ced2
Author: Julien Cristau <jcristau at debian.org>
Date: Mon Mar 7 18:55:19 2011 +0100
Xi: fix length checks for swapped clients
ChangeDeviceProperty and XIChangeProperty are followed by some data, so
use REQUEST_AT_LEAST_SIZE instead of REQUEST_SIZE_MATCH.
X.Org bug#35082 <https://bugs.freedesktop.org/show_bug.cgi?id=35082>
Reported-by: Markus Fleschutz <markus.fleschutz at x-software.com>
Signed-off-by: Julien Cristau <jcristau at debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
(cherry picked from commit eb8141b6edd8b477c0ba796be71e985c35520a9b)
diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
index 17835e2..83ce930 100644
--- a/Xi/xiproperty.c
+++ b/Xi/xiproperty.c
@@ -1051,11 +1051,11 @@ SProcXChangeDeviceProperty (ClientPtr client)
char n;
REQUEST(xChangeDevicePropertyReq);
+ REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq);
swaps(&stuff->length, n);
swapl(&stuff->property, n);
swapl(&stuff->type, n);
swapl(&stuff->nUnits, n);
- REQUEST_SIZE_MATCH(xChangeDevicePropertyReq);
return (ProcXChangeDeviceProperty(client));
}
@@ -1295,12 +1295,12 @@ SProcXIChangeProperty(ClientPtr client)
char n;
REQUEST(xXIChangePropertyReq);
+ REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq);
swaps(&stuff->length, n);
swaps(&stuff->deviceid, n);
swapl(&stuff->property, n);
swapl(&stuff->type, n);
swapl(&stuff->num_items, n);
- REQUEST_SIZE_MATCH(xXIChangePropertyReq);
return (ProcXIChangeProperty(client));
}
commit d1caa195abc648560f81356c40f08e7630544db9
Author: Rami Ylimäki <rami.ylimaki at vincit.fi>
Date: Fri Mar 4 17:55:33 2011 +0200
config: Ensure that stolen option list elements are released.
NewInputDeviceRequest steals the contents of option list elements but
doesn't use the elements themselves for anything. Therefore the list
elements need to be released always.
Signed-off-by: Rami Ylimäki <rami.ylimaki at vincit.fi>
Reviewed-by: Erkki Seppälä <erkki.seppala at vincit.fi>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
(cherry picked from commit 4114533db6704324fc26f28a444415e325ace8e0)
diff --git a/config/hal.c b/config/hal.c
index 0b848a0..297520a 100644
--- a/config/hal.c
+++ b/config/hal.c
@@ -392,10 +392,10 @@ unwind:
free(driver);
free(name);
free(config_info);
- while (!dev && (tmpo = options)) {
+ while ((tmpo = options)) {
options = tmpo->next;
- free(tmpo->key);
- free(tmpo->value);
+ free(tmpo->key); /* NULL if dev != NULL */
+ free(tmpo->value); /* NULL if dev != NULL */
free(tmpo);
}
diff --git a/config/udev.c b/config/udev.c
index ab27c98..678e47a 100644
--- a/config/udev.c
+++ b/config/udev.c
@@ -197,10 +197,10 @@ device_added(struct udev_device *udev_device)
unwind:
free(config_info);
- while (!dev && (tmpo = options)) {
+ while ((tmpo = options)) {
options = tmpo->next;
- free(tmpo->key);
- free(tmpo->value);
+ free(tmpo->key); /* NULL if dev != NULL */
+ free(tmpo->value); /* NULL if dev != NULL */
free(tmpo);
}
commit 241de6d72bdda9c925e22538aba4f91643ae0897
Author: Rami Ylimäki <rami.ylimaki at vincit.fi>
Date: Fri Mar 4 17:55:32 2011 +0200
dix: Release input device config info when the device disconnects.
Signed-off-by: Rami Ylimäki <rami.ylimaki at vincit.fi>
Reviewed-by: Erkki Seppälä <erkki.seppala at vincit.fi>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
(cherry picked from commit 8d30aff4aa708b9b885d492602ced7493a96a4df)
diff --git a/dix/devices.c b/dix/devices.c
index 89294aa..55f22cb 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -938,6 +938,8 @@ CloseDevice(DeviceIntPtr dev)
}
free(dev->deviceGrab.sync.event);
+ free(dev->config_info); /* Allocated in xf86ActivateDevice. */
+ dev->config_info = NULL;
dixFreeObjectWithPrivates(dev, PRIVATE_DEVICE);
}
commit 6a8313aee3ef06d92d8eba9ed77a963b5c5a9e7a
Author: Rami Ylimäki <rami.ylimaki at vincit.fi>
Date: Fri Mar 4 17:55:31 2011 +0200
xkb: Ensure that XKB device private won't leak on device disconnect.
Signed-off-by: Rami Ylimäki <rami.ylimaki at vincit.fi>
Reviewed-by: Erkki Seppälä <erkki.seppala at vincit.fi>
Reviewed-by: Adam Jackson <ajax at redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
(cherry picked from commit 40e56d34538f4663426db50893c231a2b5d760dc)
diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
index 8d7c124..8c0c269 100644
--- a/xkb/xkbActions.c
+++ b/xkb/xkbActions.c
@@ -68,20 +68,13 @@ xkbUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc,
Bool
XkbInitPrivates(void)
{
- return dixRegisterPrivateKey(&xkbDevicePrivateKeyRec, PRIVATE_DEVICE, 0);
+ return dixRegisterPrivateKey(&xkbDevicePrivateKeyRec, PRIVATE_DEVICE, sizeof(xkbDeviceInfoRec));
}
void
XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc)
{
- xkbDeviceInfoPtr xkbPrivPtr;
-
- xkbPrivPtr = (xkbDeviceInfoPtr) calloc(1, sizeof(xkbDeviceInfoRec));
- if (!xkbPrivPtr)
- return;
- xkbPrivPtr->unwrapProc = NULL;
-
- dixSetPrivate(&device->devPrivates, xkbDevicePrivateKey, xkbPrivPtr);
+ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(device);
WRAP_PROCESS_INPUT_PROC(device, xkbPrivPtr, proc, xkbUnwrapProc);
}
commit ee23ecc22ecac744ae2933f417f8a10dec938c94
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Thu Mar 3 14:15:55 2011 +1000
xfree86: block signals between EnableDevice and first CheckMotion()
Devices usually enable SIGIO processing in EnableDevice. CheckMotion
initialises the pointer sprite, sends Enter/Leave events, etc. This leaves
us with a small window where events may be processed without the sprite or
pointer position (as seen from the protocol) is valid.
Block signals during this window.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
(cherry picked from commit 18413f55089623123537c1499b02aa95ca2014d2)
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 74365e1..e3264e6 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -817,15 +817,18 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
/* Enable it if it's properly initialised and we're currently in the VT */
if (enable && dev->inited && dev->startup && xf86Screens[0]->vtSema)
{
+ OsBlockSignals();
EnableDevice(dev, TRUE);
if (!dev->enabled)
{
+ OsReleaseSignals();
xf86Msg(X_ERROR, "Couldn't init device \"%s\"\n", pInfo->name);
rval = BadMatch;
goto unwind;
}
/* send enter/leave event, update sprite window */
CheckMotion(NULL, dev);
+ OsReleaseSignals();
}
*pdev = dev;
commit aef58ce5ba2d4a9140bb4d2860304ae64aa713da
Author: Erkki Seppälä <erkki.seppala at vincit.fi>
Date: Tue Mar 8 13:29:41 2011 -0500
xfree86/common: Remove a configScreen leak when conf_screen is NULL
configScreen used a dynamically allocated buffer for XF86ConfScreenRec
when conf_screen argument was NULL. This pointer was never stored
anywhere, nor was it released, so this patch makes the function use
automatically allocated storage in that situation.
[ajax: minor grammar fix]
Reviewed-by: Adam Jackson <ajax at redhat.com>
Reviewed-by: Rami Ylimäki <rami.ylimaki at vincit.fi>
Signed-off-by: Erkki Seppälä <erkki.seppala at vincit.fi>
(cherry picked from commit a19771e4337d1c4600550314bbc42a1495a023ff)
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 9602e89..5312ca6 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1787,9 +1787,11 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum,
XF86ConfDisplayPtr dispptr;
XF86ConfAdaptorLinkPtr conf_adaptor;
Bool defaultMonitor = FALSE;
+ XF86ConfScreenRec local_conf_screen;
if (!conf_screen) {
- conf_screen = xnfcalloc(1, sizeof(XF86ConfScreenRec));
+ memset(&local_conf_screen, 0, sizeof(local_conf_screen));
+ conf_screen = &local_conf_screen;
conf_screen->scrn_identifier = "Default Screen Section";
xf86Msg(X_DEFAULT, "No screen section available. Using defaults.\n");
}
commit efe69b45557368191fbb38555acb06736b09b6cb
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date: Sun Feb 27 20:16:03 2011 +0100
Don't clobber input device options from xorg.conf
Since commit b8d9c5ff removed commonOptions, we now
need to append the "Core{Keyboard,Pointer}" options to
the existing list.
Fixes passing options to devices confirured in xorg.conf
on systems where autoaddevices is false.
Signed-off-by: Matthieu Herrb <matthieu.herrb at laas.fr>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
(cherry picked from commit 00779932de861bf7ac8c625802f1afed75d01b6f)
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 49d8fa8..9602e89 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1224,7 +1224,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
devs[count - 1] = xnfalloc(sizeof(InputInfoRec));
*devs[count - 1] = Pointer;
devs[count - 1]->options =
- xf86addNewOption(NULL, xnfstrdup("CorePointer"), NULL);
+ xf86addNewOption(devs[count -1]->options,
+ xnfstrdup("CorePointer"), NULL);
devs[count] = NULL;
servlayoutp->inputs = devs;
}
@@ -1364,7 +1365,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
devs[count - 1] = xnfalloc(sizeof(InputInfoRec));
*devs[count - 1] = Keyboard;
devs[count - 1]->options =
- xf86addNewOption(NULL, xnfstrdup("CoreKeyboard"), NULL);
+ xf86addNewOption(devs[count - 1]->options,
+ xnfstrdup("CoreKeyboard"), NULL);
devs[count] = NULL;
servlayoutp->inputs = devs;
}
commit fe90f0f270eeb229b43056b63dec886ffbfe9066
Author: Erkki Seppälä <erkki.seppala at vincit.fi>
Date: Thu Mar 10 11:40:40 2011 +0200
xfree86/modes: Fixed memory leak in xf86InitialConfiguration
There were two memory leaks in the function: one was the lack of free
for "enabled", the other was the full lack of releasing anything when
configuration was too small. The first issue was fixed by adding the
missing free, the other was addressed by replacing the duplicate
memory releasing sequences with one that is gotoed into.
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Rami Ylimäki <rami.ylimaki at vincit.fi>
Signed-off-by: Erkki Seppälä <erkki.seppala at vincit.fi>
Signed-off-by: Keith Packard <keithp at keithp.com>
(cherry picked from commit d3adf2d9350bee4125107e2ea1ed0c51bb736562)
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 86f038a..c2814d4 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -2354,6 +2354,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
int i = scrn->scrnIndex;
Bool have_outputs = TRUE;
Bool ret;
+ Bool success = FALSE;
/* Set up the device options */
config->options = xnfalloc (sizeof (xf86DeviceOptions));
@@ -2412,11 +2413,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
* Set the position of each output
*/
if (!xf86InitialOutputPositions (scrn, modes))
- {
- free(crtcs);
- free(modes);
- return FALSE;
- }
+ goto bailout;
/*
* Set initial panning of each output
@@ -2427,11 +2424,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
* Assign CRTCs to fit output configuration
*/
if (have_outputs && !xf86PickCrtcs (scrn, crtcs, modes, 0, width, height))
- {
- free(crtcs);
- free(modes);
- return FALSE;
- }
+ goto bailout;
/* XXX override xf86 common frame computation code */
@@ -2508,7 +2501,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
* Make sure the configuration isn't too small.
*/
if (width < config->minWidth || height < config->minHeight)
- return FALSE;
+ goto bailout;
/*
* Limit the crtc config to virtual[XY] if the driver can't grow the
@@ -2531,10 +2524,12 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow)
xf86CVTMode(width, height, 60, 0, 0));
}
-
+ success = TRUE;
+ bailout:
free(crtcs);
free(modes);
- return TRUE;
+ free(enabled);
+ return success;
}
/*
commit f6e8ac4ed1fc7687c7d312fc6a10499afbac2b31
Author: Keith Packard <keithp at keithp.com>
Date: Sat Feb 26 10:31:50 2011 -0800
loader: Don't distribute sdksyms.c and make it depend on the config
sdksyms.c is constructed by processing header files with the C
preprocessor. Its contents will vary depending on the precise
configuration options, and so must depend on the config header
files.
We have one header file which is always changed when any config option
is modified called do-not-use-config.h (which may want a different
name at some point), so make sdksyms.c depend on that file.
Also, we don't want to ship this file; it always needs to be
built. So, include it in the nodist_libloader_la_SOURCES list to
prevent it from being added to the tarball.
Signed-off-by: Keith Packard <keithp at keithp.com>
Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>
(cherry picked from commit 628d16a92a7fa556fbb70bf4a4adf57ec05c190b)
diff --git a/hw/xfree86/loader/Makefile.am b/hw/xfree86/loader/Makefile.am
index 7f386cc..0e5b304 100644
--- a/hw/xfree86/loader/Makefile.am
+++ b/hw/xfree86/loader/Makefile.am
@@ -12,18 +12,21 @@ EXTRA_DIST = \
loaderProcs.h \
sdksyms.sh
+nodist_libloader_la_SOURCES = \
+ sdksyms.c
+
libloader_la_SOURCES = \
loader.c \
loaderProcs.h \
loadext.c \
loadmod.c \
- os.c \
- sdksyms.c
+ os.c
+
libloader_la_LIBADD = $(DLOPEN_LIBS)
CLEANFILES = sdksyms.c sdksyms.dep
-sdksyms.dep sdksyms.c: sdksyms.sh
+sdksyms.dep sdksyms.c: sdksyms.sh $(top_builddir)/include/do-not-use-config.h
CPP='$(CPP)' AWK='$(AWK)' $(srcdir)/sdksyms.sh $(top_srcdir) $(AM_CFLAGS) $(CFLAGS) $(INCLUDES)
SDKSYMS_DEP = sdksyms.dep
commit 0ab680f08208afe51ad6ddc1018b7d6f8b851840
Author: Adam Jackson <ajax at redhat.com>
Date: Thu Feb 24 16:06:34 2011 -0500
vbe: Fix malloc size bug
v2: Slightly more obvious sizing math.
==14882== Invalid write of size 2
==14882== at 0x6750267: VBEGetVBEInfo (vbe.c:400)
==14882== by 0x6142064: ??? (in /usr/lib64/xorg/modules/drivers/vesa_drv.so)
==14882== by 0x471895: InitOutput (xf86Init.c:519)
==14882== by 0x422778: main (main.c:205)
==14882== Address 0x4f32fa8 is 72 bytes inside a block of size 73 alloc'd
==14882== at 0x4A0640D: malloc (vg_replace_malloc.c:236)
==14882== by 0x675024B: VBEGetVBEInfo (vbe.c:398)
==14882== by 0x6142064: ??? (in /usr/lib64/xorg/modules/drivers/vesa_drv.so)
==14882== by 0x471895: InitOutput (xf86Init.c:519)
==14882== by 0x422778: main (main.c:205)
Reviewed-by: Mark Kettenis <kettenis at openbsd.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Adam Jackson <ajax at redhat.com>
(cherry picked from commit d8caa782009abf4dc17b945e325e83fda299a534)
diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c
index bcda5ec..04132d9 100644
--- a/hw/xfree86/vbe/vbe.c
+++ b/hw/xfree86/vbe/vbe.c
@@ -395,7 +395,7 @@ VBEGetVBEInfo(vbeInfoPtr pVbe)
i = 0;
while (modes[i] != 0xffff)
i++;
- block->VideoModePtr = malloc(sizeof(CARD16) * i + 1);
+ block->VideoModePtr = malloc(sizeof(CARD16) * (i + 1));
memcpy(block->VideoModePtr, modes, sizeof(CARD16) * i);
block->VideoModePtr[i] = 0xffff;
More information about the Xquartz-changes
mailing list