xwayland: Fix cursor color

When using colored X11 cursors, the colors would appear wrong, yellow
would show white, green would show as cyan, and blue would show black
whereas red would show fine.

This is because the code expanding the cursor data accounts for green
for both green and blue channels. Funnily this bug has been there from
the beginning.

Fix the issue by correctly account for the color channels.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1303
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
1 file changed
tree: b27af2ba810d2ea920a40ff4cad66ba2db3b6431
  1. .gitlab-ci/
  2. composite/
  3. config/
  4. damageext/
  5. dbe/
  6. dix/
  7. doc/
  8. dri3/
  9. exa/
  10. fb/
  11. glamor/
  12. glx/
  13. hw/
  14. include/
  15. m4/
  16. man/
  17. mi/
  18. miext/
  19. os/
  20. present/
  21. pseudoramiX/
  22. randr/
  23. record/
  24. render/
  25. test/
  26. Xext/
  27. xfixes/
  28. Xi/
  29. xkb/
  30. .appveyor.yml
  31. .dir-locals.el
  32. .gitignore
  33. .gitlab-ci.yml
  34. .travis.yml
  35. COPYING
  36. meson.build
  37. meson_options.txt
  38. README.md
  39. xorg-server.m4
  40. xorg-server.pc.in
  41. xserver.ent.in
README.md

X Server

The X server accepts requests from client applications to create windows, which are (normally rectangular) “virtual screens” that the client program can draw into.

Windows are then composed on the actual screen by the X server (or by a separate composite manager) as directed by the window manager, which usually communicates with the user via graphical controls such as buttons and draggable titlebars and borders.

For a comprehensive overview of X Server and X Window System, consult the following article: https://en.wikipedia.org/wiki/X_server

All questions regarding this software should be directed at the Xorg mailing list:

https://lists.freedesktop.org/mailman/listinfo/xorg

The primary development code repository can be found at:

https://gitlab.freedesktop.org/xorg/xserver

For patch submission instructions, see:

https://www.x.org/wiki/Development/Documentation/SubmittingPatches

As with other projects hosted on freedesktop.org, X.Org follows its Code of Conduct, based on the Contributor Covenant. Please conduct yourself in a respectful and civilized manner when using the above mailing lists, bug trackers, etc:

https://www.freedesktop.org/wiki/CodeOfConduct