From 70d244bf84b5b931c506d36db83c7f676ad557fe Mon Sep 17 00:00:00 2001 From: Bart Massey Date: Thu, 22 Aug 2013 09:44:41 -0700 Subject: Fixed endianness bug in xy pixmap getimage. The endianness of the returned bit planes does not depend on the host bit order in the current server, and apparently not in the spec. So..yeah. --- image/xcb_image.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/image/xcb_image.c b/image/xcb_image.c index b09bfb9..5cfe383 100644 --- a/image/xcb_image.c +++ b/image/xcb_image.c @@ -340,9 +340,7 @@ xcb_image_get (xcb_connection_t * conn, image->plane_mask = plane_mask; size = image->height * image->stride; dst_plane = image->data; - if (image->bit_order == XCB_IMAGE_ORDER_MSB_FIRST) - rpm = xcb_bit_reverse(plane_mask, imrep->depth); - for (i = 0; i < imrep->depth; i++) { + for (i = imrep->depth - 1; i >= 0; --i) { if (rpm & (1 << i)) { memcpy(dst_plane, src_plane, size); src_plane += size; -- cgit v1.2.1