diff --git a/X11/xf_color.c b/X11/xf_color.c
index 20a288d..225e1ad 100644
--- a/X11/xf_color.c
+++ b/X11/xf_color.c
@@ -42,6 +42,12 @@
   _blue = (_pixel & 0xff0000) >> 16; \
   _alpha = (_pixel & 0xff000000) >> 24;
 
+#define SPLIT32RGB(_alpha, _red, _green, _blue, _pixel) \
+  _blue = _pixel & 0xff; \
+  _green = (_pixel & 0xff00) >> 8; \
+  _red = (_pixel & 0xff0000) >> 16; \
+  _alpha = (_pixel & 0xff000000) >> 24;
+
 #define SPLIT24BGR(_red, _green, _blue, _pixel) \
   _red = _pixel & 0xff; \
   _green = (_pixel & 0xff00) >> 8; \
@@ -167,6 +173,9 @@ xf_color(xfInfo * xfi, int in_color, int in_bpp, int out_bpp)
 	rv = 0;
 	switch (in_bpp)
 	{
+		case 33:
+			SPLIT32RGB(alpha, red, green, blue, in_color);
+			break;
 		case 32:
 			SPLIT32BGR(alpha, red, green, blue, in_color);
 			break;
@@ -450,6 +459,8 @@ xf_cursor_convert_alpha(xfInfo * xfi, uint8 * alpha_data,
 	int jj;
 	int xpixel;
 	int apixel;
+	int tbpp = bpp;
+	if (tbpp==32) tbpp=33;
 
 	for (j = 0; j < height; j++)
 	{
@@ -457,7 +468,7 @@ xf_cursor_convert_alpha(xfInfo * xfi, uint8 * alpha_data,
 		for (i = 0; i < width; i++)
 		{
 			xpixel = get_pixel(xormask, i, jj, width, height, bpp);
-			xpixel = xf_color(xfi, xpixel, bpp, 32);
+			xpixel = xf_color(xfi, xpixel, tbpp, 32);
 			apixel = get_pixel(andmask, i, jj, width, height, 1);
 			if (apixel != 0)
 			{
