summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2013-09-24 16:20:49 +0100
committerGraeme Geldenhuys <graemeg@gmail.com>2013-09-24 16:20:49 +0100
commit53add88c2d6a7d6ffe45be35894f64df7f407d23 (patch)
tree9c59bd0a2d54e867edfe7e7721c48791683f8cee /src/corelib
parente4592856f24e69bfb7631f9bf6d022058a16d383 (diff)
downloadfpGUI-53add88c2d6a7d6ffe45be35894f64df7f407d23.tar.xz
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.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/x11/fpg_x11.pas2
1 files changed, 0 insertions, 2 deletions
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;