summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortsi <tsi>2007-09-28 15:53:26 +0000
committertsi <tsi>2007-09-28 15:53:26 +0000
commit07113a6ae96f456b2149b817c737b511ca501fe3 (patch)
tree5d9be42abaf9ec9bdd4ec818cc3f1aafb63d51b9
parentd0e59fed5ea014ab528e6a8f817044c3085a1562 (diff)
10. Fix byte-swapping issues in libXft's handling of XImages (Alan Brown,
Bugzilla #1687).
-rw-r--r--lib/Xft/xftswap.c11
-rw-r--r--programs/Xserver/hw/xfree86/CHANGELOG4
2 files changed, 11 insertions, 4 deletions
diff --git a/lib/Xft/xftswap.c b/lib/Xft/xftswap.c
index ce813f58a..0163fd123 100644
--- a/lib/Xft/xftswap.c
+++ b/lib/Xft/xftswap.c
@@ -1,5 +1,5 @@
/*
- * $XFree86: $
+ * $XFree86: xc/lib/Xft/xftswap.c,v 1.1tsi Exp $
*
* Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc.
*
@@ -28,7 +28,7 @@
int
XftNativeByteOrder (void)
{
- int whichbyte = 1;
+ static const int whichbyte = 1;
if (*((char *) &whichbyte))
return LSBFirst;
@@ -117,6 +117,11 @@ XftSwapImage (XImage *image)
image->height * image->bytes_per_line >> 1);
break;
default:
- break;
+ return;
}
+
+ if (MSBFirst == image->byte_order)
+ image->byte_order = LSBFirst;
+ else
+ image->byte_order = MSBFirst;
}
diff --git a/programs/Xserver/hw/xfree86/CHANGELOG b/programs/Xserver/hw/xfree86/CHANGELOG
index edf89e78a..152a8ded2 100644
--- a/programs/Xserver/hw/xfree86/CHANGELOG
+++ b/programs/Xserver/hw/xfree86/CHANGELOG
@@ -1,4 +1,6 @@
XFree86 4.7.99.3 (xx October 2007)
+ 10. Fix byte-swapping issues in libXft's handling of XImages (Alan Brown,
+ Bugzilla #1687).
9. Fix the SDK's header directory structure (Marc La France).
XFree86 4.7.99.2 (23 September 2007)
@@ -20611,4 +20613,4 @@ XFree86 3.0a (28 April 1994)
XFree86 3.0 (26 April 1994)
-$XFree86: xc/programs/Xserver/hw/xfree86/CHANGELOG,v 3.3914 2007/09/23 11:08:25 dawes Exp $
+$XFree86: xc/programs/Xserver/hw/xfree86/CHANGELOG,v 3.3915 2007/09/23 20:46:17 tsi Exp $