Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • L libXft
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this wiki page for instructions on how to get full permissions. Sorry for the inconvenience.

  • xorgxorg
  • lib
  • libXft
  • Issues
  • #7
Closed
Open
Issue created Oct 11, 2018 by Thomas Loimer@thomas.loimer

XftColorAllocValue returns requested color, not closest approximation

The man page of Xft states, "An XftColor object permits text and other items to be rendered in a particular color (or the closest approximation offered by the X visual in use)." However, the code in xftcolor.c seems to return the requested color, not the color found by the X-server. I believe, the file xftcolor.c should be changed, as per the patch below. Unfortunately, at the moment I do not have a, e.g., grayscale screen at hand to test the issue.

--- a/a/xftcolor.c  
+++ b/b/xftcolor.c  
@@ -105,9 +105,9 @@ XftColorAllocValue (Display    *dpy,
            return False;  
        result->pixel = xcolor.pixel;  
     }  
-    result->color.red = color->red;  
-    result->color.green = color->green;  
-    result->color.blue = color->blue;  
+    result->color.red = xcolor.red;  
+    result->color.green = xcolor.green;  
+    result->color.blue = xcolor.blue;  
     result->color.alpha = color->alpha;  
     return True;  
 }
Edited Jun 13, 2022 by Thomas E. Dickey
Assignee
Assign to
Time tracking