cursors with opacity are displayed incorrectly
Steps to reproduce
Create a rectangular cursor with 127 in alpha channel and 255 in red, green and blue channels (white cursor with 50% opacity, should be invisible on white background). Assign this cursor to a window.
I've attached a C example program that does that - compile and run with gcc -Wall test_cursor_with_alpha.c -o test_cursor_with_alpha $(pkg-config --cflags gtk+-3.0) $(pkg-config --libs gtk+-3.0) && ./test_cursor_with_alpha
.
test_cursor_with_alpha.c
This program sets the cursor for the window, and draws the cursor image on itself for comparison.
Current behavior
Instead of invisible cursor we get a gray rectangle. I can't make a proper reliable screenshot, because all the screenshot tools seem to have troubles with partially-transparent cursors as well. But I've made a photo:
(see the gray rectangle in the middle? That's our white cursor with 50% opacity)
I've selected the (255,255,255,127) to provide minimal reproducible example, but the same problem happens with any opacity values not equal to 0 or 255. To see how this can affect real cursors you can try using attached cursor image: zoom-in (uncomment line 39 to load this image) Again, I don't know how to make a proper screenshot of the cursor, but it's horribly broken.
Expected outcome
Cursor should be rendered correctly, without color distortions.
Version information
GTK: 3.24.23
OS: Arch Linux, kernel 5.8.9-arch2-1
DE: Xfce 4.14, xfwm4 4.14.5
X11: Xorg X Server 1.20.9
Additional information
No warnings were printed to the terminal during execution of example program.