[Xquartz-changes] xserver: Branch 'server-1.10-apple' - 29 commits
Jeremy Huddleston
jeremyhu at freedesktop.org
Wed Nov 24 13:39:11 PST 2010
Rebased ref, commits from common ancestor:
commit ea0dabc50119cceed3e46edc2906c9e79cbb06d5
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 bd027cd..51aedb5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,6 +83,12 @@ AC_PROG_SED
# 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 6140b2dccb8a24698ce29938b6e54d62383ca8a5
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 e761e8f6456e3262d1b4518a4cb800ab600caef5
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 4e0f8f666e61390206c42ad2087477a912525bc7
Merge: 400ddf2... 639600f...
Author: Keith Packard <keithp at keithp.com>
Date: Wed Nov 24 11:47:33 2010 -0800
Merge remote branch 'whot/for-keith'
commit 400ddf2f58ce673c74d4e8ee829729cd3c75f8c9
Merge: 7250f07... e074f74...
Author: Keith Packard <keithp at keithp.com>
Date: Wed Nov 24 11:46:18 2010 -0800
Merge remote branch 'jeremyhu/master'
commit 7250f078c12fd20d5ac9150f54495926e5121461
Author: Gaetan Nadon <memsize at videotron.ca>
Date: Sun Nov 21 14:27:58 2010 -0500
doc: refactor Makefile and xmlrules.in code for reusability
A different approach which requires less variables setting
and internal knowledge of the reused code.
Changing from "install" to "not install" is very easy now.
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/doc/xml/Makefile.am b/doc/xml/Makefile.am
index ab3839b..6c8178a 100644
--- a/doc/xml/Makefile.am
+++ b/doc/xml/Makefile.am
@@ -22,14 +22,9 @@
#
SUBDIRS = dtrace
+doc_sources = Xserver-spec.xml
-XML_FILES = Xserver-spec.xml
-
-include $(top_srcdir)/doc/xml/xmlrules.in
-
+# Developer's documentation is not installed
if ENABLE_DEVEL_DOCS
-noinst_DATA = $(BUILT_DOC_FILES)
+include $(top_srcdir)/doc/xml/xmlrules-noinst.in
endif
-CLEANFILES = $(CLEAN_DOC_FILES)
-
-EXTRA_DIST = $(XML_FILES)
diff --git a/doc/xml/dtrace/Makefile.am b/doc/xml/dtrace/Makefile.am
index 10b4f04..1a5ad15 100644
--- a/doc/xml/dtrace/Makefile.am
+++ b/doc/xml/dtrace/Makefile.am
@@ -21,18 +21,16 @@
# DEALINGS IN THE SOFTWARE.
#
-XML_FILES = Xserver-DTrace.xml
-
-include $(top_srcdir)/doc/xml/xmlrules.in
+doc_sources = Xserver-DTrace.xml
if ENABLE_DOCS
+
+# This user's documentation is installed only if tracing is available
if XSERVER_DTRACE
-doc_DATA = $(BUILT_DOC_FILES)
+include $(top_srcdir)/doc/xml/xmlrules-inst.in
else
-noinst_DATA = $(BUILT_DOC_FILES)
-endif
+include $(top_srcdir)/doc/xml/xmlrules-noinst.in
endif
-CLEANFILES = $(CLEAN_DOC_FILES)
+endif
-EXTRA_DIST = $(XML_FILES)
diff --git a/doc/xml/xmlrules-inst.in b/doc/xml/xmlrules-inst.in
new file mode 100644
index 0000000..9b90278
--- /dev/null
+++ b/doc/xml/xmlrules-inst.in
@@ -0,0 +1,23 @@
+
+# The doc_sources variable contains one or more DocBook/XML source file.
+# The generated documents will be installed in $(docdir),
+# The DocBook/XML files will always be included in the tarball
+
+dist_doc_DATA = $(doc_sources)
+
+if HAVE_XMLTO
+doc_DATA = $(doc_sources:.xml=.html)
+
+if HAVE_FOP
+doc_DATA += $(doc_sources:.xml=.pdf)
+endif
+
+if HAVE_XMLTO_TEXT
+doc_DATA += $(doc_sources:.xml=.txt)
+endif
+
+CLEANFILES = $(doc_DATA)
+include $(top_srcdir)/doc/xml/xmlrules.in
+
+endif HAVE_XMLTO
+
diff --git a/doc/xml/xmlrules-noinst.in b/doc/xml/xmlrules-noinst.in
new file mode 100644
index 0000000..0333652
--- /dev/null
+++ b/doc/xml/xmlrules-noinst.in
@@ -0,0 +1,22 @@
+
+# The doc_sources variable contains one or more DocBook/XML source file.
+# The generated documents will NOT be installed in $(docdir),
+# The DocBook/XML files will always be included in the tarball
+
+dist_noinst_DATA = $(doc_sources)
+
+if HAVE_XMLTO
+noinst_DATA = $(doc_sources:.xml=.html)
+
+if HAVE_FOP
+noinst_DATA += $(doc_sources:.xml=.pdf)
+endif
+
+if HAVE_XMLTO_TEXT
+noinst_DATA += $(doc_sources:.xml=.txt)
+endif
+
+CLEANFILES = $(noinst_DATA)
+include $(top_srcdir)/doc/xml/xmlrules.in
+
+endif HAVE_XMLTO
diff --git a/doc/xml/xmlrules.in b/doc/xml/xmlrules.in
index fd34243..f6a2e4f 100644
--- a/doc/xml/xmlrules.in
+++ b/doc/xml/xmlrules.in
@@ -21,24 +21,15 @@
# DEALINGS IN THE SOFTWARE.
#
-# This file is included by Makefile.am in subdirectories that have
-# DocBook XML documentation files.
-#
-# No files are automatically distributed or installed by this subset of rules
-# Any files to be distributed or installed would be listed in the including
-# Makefile.am
-
-TXT_FILES = $(XML_FILES:%.xml=%.txt)
-HTML_FILES = $(XML_FILES:%.xml=%.html)
-PDF_FILES = $(XML_FILES:%.xml=%.pdf)
-
-BUILT_DOC_FILES =
-
-SUFFIXES = .xml .txt .html .pdf
+# This file provides pattern rules to generate html/pdf/txt from DocBook/XML
+# A stylesheet is used if xorg-sgml-doctools is installed
+# This file is included by xmlrules-inst.in for installable user's documentation
+# It is included by xmlrules-noinst for non installable developer's documentation
+# If the server version or release date changes, autogen && make
XML_ENT_DIR = $(abs_top_builddir)/doc/xml
+SUFFIXES = .xml .txt .html .pdf
-if HAVE_XMLTO
XMLTO_FLAGS = --searchpath $(XML_ENT_DIR)
if HAVE_STYLESHEETS
@@ -46,23 +37,11 @@ XMLTO_FLAGS += -m $(XSL_STYLESHEET) \
--stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css
endif
-if HAVE_XMLTO_TEXT
-BUILT_DOC_FILES += $(TXT_FILES)
%.txt: %.xml $(XML_ENT_DIR)/xserver.ent
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
-endif
-BUILT_DOC_FILES += $(HTML_FILES)
%.html: %.xml $(XML_ENT_DIR)/xserver.ent
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
-if HAVE_FOP
-BUILT_DOC_FILES += $(PDF_FILES)
%.pdf: %.xml $(XML_ENT_DIR)/xserver.ent
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
-endif
-
-endif HAVE_XMLTO
-
-CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES)
-
diff --git a/hw/dmx/doc/Makefile.am b/hw/dmx/doc/Makefile.am
index 3b22850..6dea366 100644
--- a/hw/dmx/doc/Makefile.am
+++ b/hw/dmx/doc/Makefile.am
@@ -19,14 +19,12 @@
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-XML_FILES = dmx.xml scaled.xml
-
-include $(top_srcdir)/doc/xml/xmlrules.in
+doc_sources = dmx.xml scaled.xml
+# Developer's documentation is not installed
if ENABLE_DEVEL_DOCS
-noinst_DATA = $(BUILT_DOC_FILES)
+include $(top_srcdir)/doc/xml/xmlrules-noinst.in
endif
-CLEANFILES = $(CLEAN_DOC_FILES)
if HAVE_DOXYGEN
diff --git a/hw/xfree86/doc/sgml/Makefile.am b/hw/xfree86/doc/sgml/Makefile.am
index efed19d..10eca86 100644
--- a/hw/xfree86/doc/sgml/Makefile.am
+++ b/hw/xfree86/doc/sgml/Makefile.am
@@ -19,13 +19,9 @@
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-XML_FILES = DESIGN.xml
-
-include $(top_srcdir)/doc/xml/xmlrules.in
+doc_sources = DESIGN.xml
+# Developer's documentation is not installed
if ENABLE_DEVEL_DOCS
-noinst_DATA = $(BUILT_DOC_FILES)
+include $(top_srcdir)/doc/xml/xmlrules-noinst.in
endif
-CLEANFILES = $(CLEAN_DOC_FILES)
-
-EXTRA_DIST = $(XML_FILES)
commit f33512b70cf0350a62df2ee2287a870d5fc991a8
Author: Gaetan Nadon <memsize at videotron.ca>
Date: Sun Nov 21 14:27:57 2010 -0500
xmlrules.in: use $(top_srcdir) rather than ../../../ [...]
Relative paths don't always work in distcheck when srcdir not = builddir
include $(top_srcdir)/doc/xml/xmlrules.in
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/doc/xml/Makefile.am b/doc/xml/Makefile.am
index e66f192..ab3839b 100644
--- a/doc/xml/Makefile.am
+++ b/doc/xml/Makefile.am
@@ -25,7 +25,7 @@ SUBDIRS = dtrace
XML_FILES = Xserver-spec.xml
-include xmlrules.in
+include $(top_srcdir)/doc/xml/xmlrules.in
if ENABLE_DEVEL_DOCS
noinst_DATA = $(BUILT_DOC_FILES)
diff --git a/doc/xml/dtrace/Makefile.am b/doc/xml/dtrace/Makefile.am
index a95d374..10b4f04 100644
--- a/doc/xml/dtrace/Makefile.am
+++ b/doc/xml/dtrace/Makefile.am
@@ -23,7 +23,7 @@
XML_FILES = Xserver-DTrace.xml
-include ../xmlrules.in
+include $(top_srcdir)/doc/xml/xmlrules.in
if ENABLE_DOCS
if XSERVER_DTRACE
diff --git a/hw/dmx/doc/Makefile.am b/hw/dmx/doc/Makefile.am
index 58306d2..3b22850 100644
--- a/hw/dmx/doc/Makefile.am
+++ b/hw/dmx/doc/Makefile.am
@@ -21,7 +21,7 @@
XML_FILES = dmx.xml scaled.xml
-include ../../../doc/xml/xmlrules.in
+include $(top_srcdir)/doc/xml/xmlrules.in
if ENABLE_DEVEL_DOCS
noinst_DATA = $(BUILT_DOC_FILES)
diff --git a/hw/xfree86/doc/sgml/Makefile.am b/hw/xfree86/doc/sgml/Makefile.am
index 5322b42..efed19d 100644
--- a/hw/xfree86/doc/sgml/Makefile.am
+++ b/hw/xfree86/doc/sgml/Makefile.am
@@ -21,7 +21,7 @@
XML_FILES = DESIGN.xml
-include ../../../../doc/xml/xmlrules.in
+include $(top_srcdir)/doc/xml/xmlrules.in
if ENABLE_DEVEL_DOCS
noinst_DATA = $(BUILT_DOC_FILES)
commit c25b407f22456f50eef90d9bc5e026c05415c021
Author: Gaetan Nadon <memsize at videotron.ca>
Date: Sun Nov 21 14:27:56 2010 -0500
xmlrules.in: specify the xserver entities depedencies on the target
The generated docs will rebuild when the xserver.ent file changes.
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/doc/xml/xmlrules.in b/doc/xml/xmlrules.in
index f3b76f9..fd34243 100644
--- a/doc/xml/xmlrules.in
+++ b/doc/xml/xmlrules.in
@@ -48,17 +48,17 @@ endif
if HAVE_XMLTO_TEXT
BUILT_DOC_FILES += $(TXT_FILES)
-%.txt: %.xml
+%.txt: %.xml $(XML_ENT_DIR)/xserver.ent
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
endif
BUILT_DOC_FILES += $(HTML_FILES)
-%.html: %.xml
+%.html: %.xml $(XML_ENT_DIR)/xserver.ent
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
if HAVE_FOP
BUILT_DOC_FILES += $(PDF_FILES)
-%.pdf: %.xml
+%.pdf: %.xml $(XML_ENT_DIR)/xserver.ent
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
endif
@@ -66,8 +66,3 @@ endif HAVE_XMLTO
CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES)
-# All the files we build depend on the entities
-$(BUILT_DOC_FILES): $(XML_ENT_DIR)/xserver.ent
-
-$(XML_ENT_DIR)/xserver.ent:
- (cd $(XML_ENT_DIR) && $(MAKE) $(AM_MAKEFLAGS) $(@F))
commit 73841074eb856e6be3b9f9e3fc2d2721443166ab
Author: Gaetan Nadon <memsize at videotron.ca>
Date: Sun Nov 21 14:27:55 2010 -0500
xmlrules.in: use pattern rules to enable dependencies
This will allow a dependency to be specified as done in libX11:
%.html: %.xml $(dist_spec_DATA)
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/doc/xml/xmlrules.in b/doc/xml/xmlrules.in
index 987d6b6..f3b76f9 100644
--- a/doc/xml/xmlrules.in
+++ b/doc/xml/xmlrules.in
@@ -48,17 +48,17 @@ endif
if HAVE_XMLTO_TEXT
BUILT_DOC_FILES += $(TXT_FILES)
-.xml.txt:
+%.txt: %.xml
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
endif
BUILT_DOC_FILES += $(HTML_FILES)
-.xml.html:
+%.html: %.xml
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
if HAVE_FOP
BUILT_DOC_FILES += $(PDF_FILES)
-.xml.pdf:
+%.pdf: %.xml
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
endif
commit 97e307dda201d6ba28a723c21a95e484921d1b08
Author: Gaetan Nadon <memsize at videotron.ca>
Date: Sun Nov 21 14:27:54 2010 -0500
xmlrules.in: no need to setup xmlto flags when configuring --without-xmlto
The AM conditional HAVE_XMLTO should wrap more statements.
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/doc/xml/xmlrules.in b/doc/xml/xmlrules.in
index c455ded..987d6b6 100644
--- a/doc/xml/xmlrules.in
+++ b/doc/xml/xmlrules.in
@@ -37,6 +37,8 @@ BUILT_DOC_FILES =
SUFFIXES = .xml .txt .html .pdf
XML_ENT_DIR = $(abs_top_builddir)/doc/xml
+
+if HAVE_XMLTO
XMLTO_FLAGS = --searchpath $(XML_ENT_DIR)
if HAVE_STYLESHEETS
@@ -44,7 +46,6 @@ XMLTO_FLAGS += -m $(XSL_STYLESHEET) \
--stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css
endif
-if HAVE_XMLTO
if HAVE_XMLTO_TEXT
BUILT_DOC_FILES += $(TXT_FILES)
.xml.txt:
@@ -61,7 +62,7 @@ BUILT_DOC_FILES += $(PDF_FILES)
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
endif
-endif
+endif HAVE_XMLTO
CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES)
commit 1a7b14d1183057fc69a5da446e898104b65c8347
Author: Gaetan Nadon <memsize at videotron.ca>
Date: Sun Nov 21 14:27:53 2010 -0500
xmlrules.in: remove unrequired "@rm -f $@" from doc targets
Unable to find a purpose for this, not used anywhere else
but in the font module.
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/doc/xml/xmlrules.in b/doc/xml/xmlrules.in
index f828eef..c455ded 100644
--- a/doc/xml/xmlrules.in
+++ b/doc/xml/xmlrules.in
@@ -48,19 +48,16 @@ if HAVE_XMLTO
if HAVE_XMLTO_TEXT
BUILT_DOC_FILES += $(TXT_FILES)
.xml.txt:
- @rm -f $@
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
endif
BUILT_DOC_FILES += $(HTML_FILES)
.xml.html:
- @rm -f $@
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
if HAVE_FOP
BUILT_DOC_FILES += $(PDF_FILES)
.xml.pdf:
- @rm -f $@
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
endif
commit d3c523bd124dc1a3f4539f7f6cd4868adbfc25e1
Author: Gaetan Nadon <memsize at videotron.ca>
Date: Sun Nov 21 14:27:52 2010 -0500
doc: HTML file generation: use the installed copy of xorg.css
Currently the xorg.css file is copied in each location
where a DocBook/XML file resides. This produces about
70 copies in the $(docdir) install tree for all of xorg.
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/doc/xml/.gitignore b/doc/xml/.gitignore
index 3d050f0..4961738 100644
--- a/doc/xml/.gitignore
+++ b/doc/xml/.gitignore
@@ -3,4 +3,3 @@ xserver.ent
Xserver-spec.html
Xserver-spec.pdf
Xserver-spec.txt
-xorg.css
diff --git a/doc/xml/dtrace/.gitignore b/doc/xml/dtrace/.gitignore
index a43c4e1..e2a21d1 100644
--- a/doc/xml/dtrace/.gitignore
+++ b/doc/xml/dtrace/.gitignore
@@ -1,4 +1,3 @@
Xserver-DTrace.html
Xserver-DTrace.pdf
Xserver-DTrace.txt
-xorg.css
diff --git a/doc/xml/xmlrules.in b/doc/xml/xmlrules.in
index b7fda11..f828eef 100644
--- a/doc/xml/xmlrules.in
+++ b/doc/xml/xmlrules.in
@@ -40,11 +40,8 @@ XML_ENT_DIR = $(abs_top_builddir)/doc/xml
XMLTO_FLAGS = --searchpath $(XML_ENT_DIR)
if HAVE_STYLESHEETS
-XMLTO_FLAGS += -m $(XSL_STYLESHEET)
-BUILT_DOC_FILES += xorg.css
-
-xorg.css: $(STYLESHEET_SRCDIR)/xorg.css
- $(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@
+XMLTO_FLAGS += -m $(XSL_STYLESHEET) \
+ --stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css
endif
if HAVE_XMLTO
@@ -69,7 +66,7 @@ endif
endif
-CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES) xorg.css
+CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES)
# All the files we build depend on the entities
$(BUILT_DOC_FILES): $(XML_ENT_DIR)/xserver.ent
commit 504e3010e976ccc008ff48417850b594beaee2ec
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Fri Nov 19 22:09:05 2010 -0800
Xorg.man: Replace XDarwin reference with Xquartz
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/doc/man/Xorg.man.pre b/hw/xfree86/doc/man/Xorg.man.pre
index 805f3a3..86e89a9 100644
--- a/hw/xfree86/doc/man/Xorg.man.pre
+++ b/hw/xfree86/doc/man/Xorg.man.pre
@@ -32,8 +32,8 @@ SPARC and PowerPC. The most widely supported operating systems are the
free/OpenSource UNIX-like systems such as Linux, FreeBSD, NetBSD,
OpenBSD, and Solaris. Commercial UNIX operating systems such as
UnixWare are also supported. Other supported operating systems include
-GNU Hurd. Darwin and Mac OS X are supported with the
-XDarwin(__appmansuffix__) X server. Win32/Cygwin is supported with the
+GNU Hurd. Mac OS X is supported with the
+Xquartz(__appmansuffix__) X server. Win32/Cygwin is supported with the
XWin(__appmansuffix__) X server.
.PP
.SH "NETWORK CONNECTIONS"
commit 566d09a5cd6452ee2e05e23d2205e7c3aa31f0da
Author: Bill Nottingham <notting at redhat.com>
Date: Mon Nov 15 11:25:14 2010 +1000
xfree86: store the screen's gamma information on init.
This fixes a gamma issue on vt switch observed with KDM. VT switching away
and back would result in a black screen. Avoid this by storing the current
gamma information on init.
https://bugzilla.redhat.com/show_bug.cgi?id=533217
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Keith Packard <keithp at keithp.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index f562f58..2fe0c47 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1757,6 +1757,7 @@ xf86RandR12Init12 (ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
rrScrPrivPtr rp = rrGetScrPriv(pScreen);
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ int i;
rp->rrGetInfo = xf86RandR12GetInfo12;
rp->rrScreenSetSize = xf86RandR12ScreenSetSize;
@@ -1786,6 +1787,9 @@ xf86RandR12Init12 (ScreenPtr pScreen)
*/
if (!xf86RandR12SetInfo12 (pScreen))
return FALSE;
+ for (i = 0; i < rp->numCrtcs; i++) {
+ xf86RandR12CrtcGetGamma(pScreen, rp->crtcs[i]);
+ }
return TRUE;
}
commit c050aa2f5fa6a7ff8ce4f91def14ca44f799f067
Author: Adam Jackson <ajax at redhat.com>
Date: Mon Nov 15 11:25:12 2010 +1000
xfree86: apply gamma settings on EnterVT.
When entering the VT, re-apply the saved gamma settings for each screen.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Keith Packard <keithp at keithp.com>
Signed-off-by: Keith Packard <keithp at keithp.com>
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index ba0862a..f562f58 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1731,6 +1731,7 @@ xf86RandR12EnterVT (int screen_index, int flags)
ScreenPtr pScreen = screenInfo.screens[screen_index];
ScrnInfoPtr pScrn = xf86Screens[screen_index];
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
+ rrScrPrivPtr rp = rrGetScrPriv(pScreen);
Bool ret;
if (randrp->orig_EnterVT) {
@@ -1742,6 +1743,11 @@ xf86RandR12EnterVT (int screen_index, int flags)
return FALSE;
}
+ /* reload gamma */
+ int i;
+ for (i = 0; i < rp->numCrtcs; i++)
+ xf86RandR12CrtcSetGamma(pScreen, rp->crtcs[i]);
+
return RRGetInfo (pScreen, TRUE); /* force a re-probe of outputs and notify clients about changes */
}
commit 639600fa7ebad7a4953d0b632abeff2d339a49c6
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Tue Nov 23 13:30:05 2010 +1000
dix: add a fixme about a corner-case that should probably be fixed.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/dix/getevents.c b/dix/getevents.c
index f19c991..0d59290 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1255,6 +1255,10 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, const Valuato
valuator_mask_unset(&mask, i);
}
+ /* FIXME: posting proximity events with relative valuators only results
+ * in an empty event, EventToXI() will fail to convert â no event sent
+ * to client. */
+
events = UpdateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events);
event = (DeviceEvent *) events->event;
commit 0aca9e8424d8b978053a29c4468f800fc2e7238c
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Tue Nov 23 13:04:19 2010 +1000
dix: fix typo, set the second valuator with the y-axis data.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Tested-by: Jeremy Huddleston <jeremyhu at apple.com>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/dix/getevents.c b/dix/getevents.c
index f80e87c..f19c991 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1186,7 +1186,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
if (valuator_mask_isset(&mask, 0))
valuator_mask_set(&mask, 0, x);
if (valuator_mask_isset(&mask, 1))
- valuator_mask_set(&mask, 0, y);
+ valuator_mask_set(&mask, 1, y);
clipValuators(pDev, &mask);
commit 45131bb67f9eacb3b55de4bcd3730fb9bb028e8a
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Tue Nov 23 12:55:50 2010 +1000
dix: GetProximityEvents needs to check up to the last valuator
valuator_mask_size() returns the highest valuator set as opposed to the
number of set bits (which obviously changes as we unset valuators).
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/dix/getevents.c b/dix/getevents.c
index 5f4fb66..f80e87c 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1248,7 +1248,7 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, const Valuato
valuator_mask_copy(&mask, mask_in);
/* ignore relative axes for proximity. */
- for (i = 0; i < valuator_mask_num_valuators(&mask); i++)
+ for (i = 0; i < valuator_mask_size(&mask); i++)
{
if (valuator_mask_isset(&mask, i) &&
valuator_get_mode(pDev, i) == Relative)
commit 048e93593e3f7a99a7d2a219e1ce2bdc9d407807
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Tue Nov 23 11:15:52 2010 +1000
dix: when converting to XI 1.x events, use the first_valuator's device mode
Don't stop processing events when a valuator's mode doesn't match the 0th
valuator's mode. Instead, start with the first_valuator in the event and
keep stacking them on until the first valuator with a different mode is hit.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/dix/eventconvert.c b/dix/eventconvert.c
index b92169e..dd17898 100644
--- a/dix/eventconvert.c
+++ b/dix/eventconvert.c
@@ -324,14 +324,16 @@ countValuators(DeviceEvent *ev, int *first)
for (i = 0; i < sizeof(ev->valuators.mask) * 8; i++)
{
- /* Assume mode of 0th valuator matches XI1 device mode. Stop when the
- * event mode changes since XI1 can't handle mixed mode devices.
- */
- if (BitIsOn(ev->valuators.mode, i) != BitIsOn(ev->valuators.mode, 0))
- break;
-
if (BitIsOn(ev->valuators.mask, i))
{
+ /* Assume mode of first_valuator matches XI1 device mode. Stop when the
+ * event mode changes since XI1 can't handle mixed mode devices.
+ */
+ if (first_valuator > -1 &&
+ BitIsOn(ev->valuators.mode, i) !=
+ BitIsOn(ev->valuators.mode, first_valuator))
+ break;
+
if (first_valuator == -1)
first_valuator = i;
last_valuator = i;
commit 4f3e670fd28fceec384ff0d4ca7c1ff8d7a872ad
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Tue Nov 23 10:59:52 2010 +1000
dix: when comparing axis modes, compare the bits, not the bytes.
The DeviceEvent's mode field is a set of bits for each valuator, not bytes.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/dix/eventconvert.c b/dix/eventconvert.c
index 46eb4ff..b92169e 100644
--- a/dix/eventconvert.c
+++ b/dix/eventconvert.c
@@ -327,7 +327,7 @@ countValuators(DeviceEvent *ev, int *first)
/* Assume mode of 0th valuator matches XI1 device mode. Stop when the
* event mode changes since XI1 can't handle mixed mode devices.
*/
- if (ev->valuators.mode[i] != ev->valuators.mode[0])
+ if (BitIsOn(ev->valuators.mode, i) != BitIsOn(ev->valuators.mode, 0))
break;
if (BitIsOn(ev->valuators.mask, i))
commit 6f12934d4ea52f17ac7b21e92f4f929db165f83d
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Tue Nov 23 10:58:32 2010 +1000
dix: replace a manual valuator check with valuator_get_mode().
This check was missing the OutOfProximity mask and resulted in the wrong
bits being set in InternalEvents.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
diff --git a/dix/getevents.c b/dix/getevents.c
index 06a0da0..5f4fb66 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -210,7 +210,7 @@ set_valuators(DeviceIntPtr dev, DeviceEvent* event, ValuatorMask *mask)
if (valuator_mask_isset(mask, i))
{
SetBit(event->valuators.mask, i);
- if (dev->valuator->axes[i].mode == Absolute)
+ if (valuator_get_mode(dev, i) == Absolute)
SetBit(event->valuators.mode, i);
event->valuators.data[i] = valuator_mask_get(mask, i);
event->valuators.data_frac[i] =
commit ebe3ddaf284ad388835da9cbaa6ad61fa21ce6dd
Author: Simon Thum <simon.thum at gmx.de>
Date: Fri Nov 19 11:09:21 2010 +1000
dix: fix up valuators passed to acceleration code.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Simon Thum <simon.thum at gmx.de>
Reviewed-by: Chase Douglas <chase.douglas at canonical.com>
diff --git a/dix/getevents.c b/dix/getevents.c
index a288e36..06a0da0 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1159,11 +1159,16 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
* should be converted to masked valuators. */
int vals[2];
vals[0] = valuator_mask_isset(&mask, 0) ?
- valuator_mask_get(&mask, 0) : pDev->last.valuators[0];
+ valuator_mask_get(&mask, 0) : 0;
vals[1] = valuator_mask_isset(&mask, 1) ?
- valuator_mask_get(&mask, 1) : pDev->last.valuators[1];
+ valuator_mask_get(&mask, 1) : 0;
accelPointer(pDev, 0, 2, vals, ms);
+ if (valuator_mask_isset(&mask, 0))
+ valuator_mask_set(&mask, 0, vals[0]);
+ if (valuator_mask_isset(&mask, 1))
+ valuator_mask_set(&mask, 1, vals[1]);
+
/* The pointer acceleration code modifies the fractional part
* in-place, so we need to extract this information first */
x_frac = pDev->last.remainder[0];
commit d435e1ecb86e2fe6292b5945262956644f979bbb
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Fri Feb 5 11:08:27 2010 +1000
test: reduce range of byte-padding macro tests.
Byte padding and conversion is interesting for the rage of 0-8 bytes, and
then interesting towards the end of the valid range (INT_MAX - 7 and INT_MAX
- 3).
Note: this changes the upper range for pad_to_int32() and bytes_to_int32()
from the previous (INT_MAX - 4) to (INT_MAX - 3).
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Julien Cristau <jcristau at debian.org>
diff --git a/test/input.c b/test/input.c
index 13a441e..4ccfaff 100644
--- a/test/input.c
+++ b/test/input.c
@@ -683,45 +683,82 @@ static void dix_grab_matching(void)
g_assert(rc == TRUE);
}
-static void include_byte_padding_macros(void)
+static void test_bits_to_byte(int i)
{
- int i;
- g_test_message("Testing bits_to_bytes()");
-
- /* the macros don't provide overflow protection */
- for (i = 0; i < INT_MAX - 7; i++)
- {
int expected_bytes;
expected_bytes = (i + 7)/8;
g_assert(bits_to_bytes(i) >= i/8);
g_assert((bits_to_bytes(i) * 8) - i <= 7);
g_assert(expected_bytes == bits_to_bytes(i));
- }
+}
- g_test_message("Testing bytes_to_int32()");
- for (i = 0; i < INT_MAX - 3; i++)
- {
+static void test_bytes_to_int32(int i)
+{
int expected_4byte;
expected_4byte = (i + 3)/4;
g_assert(bytes_to_int32(i) <= i);
g_assert((bytes_to_int32(i) * 4) - i <= 3);
g_assert(expected_4byte == bytes_to_int32(i));
- }
-
- g_test_message("Testing pad_to_int32");
+}
- for (i = 0; i < INT_MAX - 3; i++)
- {
+static void test_pad_to_int32(int i)
+{
int expected_bytes;
expected_bytes = ((i + 3)/4) * 4;
g_assert(pad_to_int32(i) >= i);
g_assert(pad_to_int32(i) - i <= 3);
g_assert(expected_bytes == pad_to_int32(i));
- }
+}
+static void include_byte_padding_macros(void)
+{
+ g_test_message("Testing bits_to_bytes()");
+
+ /* the macros don't provide overflow protection */
+ test_bits_to_byte(0);
+ test_bits_to_byte(1);
+ test_bits_to_byte(2);
+ test_bits_to_byte(7);
+ test_bits_to_byte(8);
+ test_bits_to_byte(0xFF);
+ test_bits_to_byte(0x100);
+ test_bits_to_byte(INT_MAX - 9);
+ test_bits_to_byte(INT_MAX - 8);
+
+ g_test_message("Testing bytes_to_int32()");
+
+ test_bytes_to_int32(0);
+ test_bytes_to_int32(1);
+ test_bytes_to_int32(2);
+ test_bytes_to_int32(7);
+ test_bytes_to_int32(8);
+ test_bytes_to_int32(0xFF);
+ test_bytes_to_int32(0x100);
+ test_bytes_to_int32(0xFFFF);
+ test_bytes_to_int32(0x10000);
+ test_bytes_to_int32(0xFFFFFF);
+ test_bytes_to_int32(0x1000000);
+ test_bytes_to_int32(INT_MAX - 4);
+ test_bytes_to_int32(INT_MAX - 3);
+
+ g_test_message("Testing pad_to_int32");
+ test_pad_to_int32(0);
+ test_pad_to_int32(0);
+ test_pad_to_int32(1);
+ test_pad_to_int32(2);
+ test_pad_to_int32(7);
+ test_pad_to_int32(8);
+ test_pad_to_int32(0xFF);
+ test_pad_to_int32(0x100);
+ test_pad_to_int32(0xFFFF);
+ test_pad_to_int32(0x10000);
+ test_pad_to_int32(0xFFFFFF);
+ test_pad_to_int32(0x1000000);
+ test_pad_to_int32(INT_MAX - 4);
+ test_pad_to_int32(INT_MAX - 3);
}
static void xi_unregister_handlers(void)
commit f49ee9074a66883a3c525b0d6e71589123288465
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Fri Feb 5 10:59:52 2010 +1000
test: compare byte padding macros against the expected bytes.
We calculate the expected bytes for each value, let's use it.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Julien Cristau <jcristau at debian.org>
diff --git a/test/input.c b/test/input.c
index f8ce4b2..13a441e 100644
--- a/test/input.c
+++ b/test/input.c
@@ -696,6 +696,7 @@ static void include_byte_padding_macros(void)
g_assert(bits_to_bytes(i) >= i/8);
g_assert((bits_to_bytes(i) * 8) - i <= 7);
+ g_assert(expected_bytes == bits_to_bytes(i));
}
g_test_message("Testing bytes_to_int32()");
@@ -706,6 +707,7 @@ static void include_byte_padding_macros(void)
g_assert(bytes_to_int32(i) <= i);
g_assert((bytes_to_int32(i) * 4) - i <= 3);
+ g_assert(expected_4byte == bytes_to_int32(i));
}
g_test_message("Testing pad_to_int32");
@@ -717,6 +719,7 @@ static void include_byte_padding_macros(void)
g_assert(pad_to_int32(i) >= i);
g_assert(pad_to_int32(i) - i <= 3);
+ g_assert(expected_bytes == pad_to_int32(i));
}
}
commit b31df0439fe336a43a2355e2f1fb223d86045a05
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Mon Nov 22 15:14:02 2010 +1000
xfree86: add missing linebreak in error message.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Magnus Kessler <Magnus.Kessler at gmx.net>
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 3664d46..81bb707 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -1296,7 +1296,7 @@ xf86ScaleAxis(int Cx,
}
else {
X = 0;
- ErrorF ("Divide by Zero in xf86ScaleAxis");
+ ErrorF ("Divide by Zero in xf86ScaleAxis\n");
}
if (X > to_max)
commit 31737fff08ec19b394837341d5e358ec401f5cd8
Author: Chase Douglas <chase.douglas at ubuntu.com>
Date: Mon Nov 15 11:42:12 2010 -0500
Fix transformAbsolute
transformAbsolute must use old values if valuator mask doesn't have new
ones, and it must only set new values if there was a change.
Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/dix/getevents.c b/dix/getevents.c
index bc5841f..a288e36 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1057,14 +1057,18 @@ transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask)
struct pixman_f_vector p;
/* p' = M * p in homogeneous coordinates */
- p.v[0] = valuator_mask_get(mask, 0);
- p.v[1] = valuator_mask_get(mask, 1);
+ p.v[0] = (valuator_mask_isset(mask, 0) ? valuator_mask_get(mask, 0) :
+ dev->last.valuators[0]);
+ p.v[1] = (valuator_mask_isset(mask, 1) ? valuator_mask_get(mask, 1) :
+ dev->last.valuators[1]);
p.v[2] = 1.0;
pixman_f_transform_point(&dev->transform, &p);
- valuator_mask_set(mask, 0, lround(p.v[0]));
- valuator_mask_set(mask, 1, lround(p.v[1]));
+ if (lround(p.v[0]) != dev->last.valuators[0])
+ valuator_mask_set(mask, 0, lround(p.v[0]));
+ if (lround(p.v[1]) != dev->last.valuators[1])
+ valuator_mask_set(mask, 1, lround(p.v[1]));
}
/**
commit 463841f45aafd1227bac652965c9ea337dd527fa
Author: Chase Douglas <chase.douglas at ubuntu.com>
Date: Mon Nov 15 11:42:11 2010 -0500
Fix GPE Y axis scaling
Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/dix/getevents.c b/dix/getevents.c
index 9553728..bc5841f 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1139,7 +1139,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
}
if (valuator_mask_isset(&mask, 1))
{
- scaled = rescaleValuatorAxis(valuator_mask_get(&mask, 0),
+ scaled = rescaleValuatorAxis(valuator_mask_get(&mask, 1),
0.0, &y_frac, NULL,
pDev->valuator->axes + 1,
scr->height);
commit a6b9e8f1e5d5d0b3b0f121a6f677eeca7aab1950
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Aug 25 11:06:38 2010 -0400
linux: Fix CPU usage bug in console fd flushing
If the vt gets a vhangup from under us, then the tty will appear ready
in select(), but trying to tcflush() it will return -EIO, so we'll spin
around at 100% CPU for no reason. Notice this condition and unregister
the handler if it happens.
Signed-off-by: Adam Jackson <ajax at redhat.com>
Reviewed-by: Mikhail Gusarov <dottedmag at dottedmag.net>
Reviewed-by: Julien Cristau <jcristau at debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index bf61ceb..7ee9046 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -85,7 +85,11 @@ static void *console_handler;
static void
drain_console(int fd, void *closure)
{
- tcflush(fd, TCIOFLUSH);
+ errno = 0;
+ if (tcflush(fd, TCIOFLUSH) == -1 && errno == EIO) {
+ xf86RemoveGeneralHandler(console_handler);
+ console_handler = NULL;
+ }
}
void
commit ecdbe817fd7eb53fd1e7485c0492355f7f002d2a
Author: Dan Horák <dan at danny.cz>
Date: Tue Jun 22 19:45:26 2010 +0200
XF86CONFIGDIR is undefined when built with --disable-xorg (#28672)
The 10-evdev.conf file gets installed as /usr/share/X11/10-evdev.conf on
platforms that built the server with --disable-xorg like s390/s390x. The
definition/installation should be guarded with "if XORG" because it makes
sense only when built with xorg.
X.Org Bug 28672 <http://bugs.freedesktop.org/show_bug.cgi?id=28672>
Signed-off-by: Dan Horák <dan at danny.cz>
Acked-by: Julien Cristau <jcristau at debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
diff --git a/config/Makefile.am b/config/Makefile.am
index e1f1c4e..4a2e873 100644
--- a/config/Makefile.am
+++ b/config/Makefile.am
@@ -9,8 +9,10 @@ AM_CFLAGS += $(UDEV_CFLAGS)
libconfig_la_SOURCES += udev.c
libconfig_la_LIBADD = $(UDEV_LIBS)
+if XORG
xorgconfddir = $(datadir)/X11/$(XF86CONFIGDIR)
xorgconfd_DATA = 10-evdev.conf
+endif
else
More information about the Xquartz-changes
mailing list