From 249bb1292fc93e361ef206b7c7291fb1273ff8de Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 10 Oct 2016 09:19:43 +0200 Subject: [PATCH] Fixed pointer color mapping. --- client/X11/xf_graphics.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/X11/xf_graphics.c b/client/X11/xf_graphics.c index 7a0823feb..54672d250 100644 --- a/client/X11/xf_graphics.c +++ b/client/X11/xf_graphics.c @@ -168,7 +168,7 @@ static BOOL xf_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap, static BOOL xf_Pointer_New(rdpContext* context, rdpPointer* pointer) { #ifdef WITH_XCURSOR - UINT32 CursorFormat = PIXEL_FORMAT_RGBA32; + UINT32 CursorFormat; rdpGdi* gdi; size_t size; XcursorImage ci; @@ -178,6 +178,11 @@ static BOOL xf_Pointer_New(rdpContext* context, rdpPointer* pointer) if (!context || !pointer || !context->gdi) return FALSE; + if (!xfc->invert) + CursorFormat = PIXEL_FORMAT_RGBA32; + else + CursorFormat = PIXEL_FORMAT_BGRA32; + gdi = context->gdi; xf_lock_x11(xfc, FALSE); ZeroMemory(&ci, sizeof(ci));