From 53add88c2d6a7d6ffe45be35894f64df7f407d23 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 24 Sep 2013 16:20:49 +0100 Subject: x11: fixes fpgColorToX(). We did the color conversion to RGB, and then in the last block of code we strangely discarded that conversion. Without the color conversion (some colors can be "alias colors" like clButtonFace) we might process rubbish data. Now it should be fixed. Thanks to user UAPLY for spotting this. --- src/corelib/x11/fpg_x11.pas | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/corelib/x11') diff --git a/src/corelib/x11/fpg_x11.pas b/src/corelib/x11/fpg_x11.pas index c7a1b865..bc9c9dbd 100644 --- a/src/corelib/x11/fpg_x11.pas +++ b/src/corelib/x11/fpg_x11.pas @@ -501,7 +501,6 @@ var c: TfpgColor; begin c := fpgColorToRGB(col); - if xapplication.DisplayDepth >= 24 then Result := c and $FFFFFF { No Alpha channel information } else if xapplication.DisplayDepth = 16 then @@ -510,7 +509,6 @@ begin Result := ConvertTo555Pixel(c) else begin - c := col; xc.blue := (c and $000000FF) shl 8; xc.green := (c and $0000FF00); xc.red := (c and $00FF0000) shr 8; -- cgit v1.2.3-70-g09d2