Created attachment 122658 [details]
Example program demonstrating the problem
Thanks to the help of many people with the final hint coming from Michel Dänzer on IRC, I finally figured out https://github.com/i3/i3/issues/2248.
To reproduce this issue, run the attached program (gcc -Wall -Wextra -O2 test.c $(pkg-config --cflags --libs xcb xcb-render) && ./a.out). The expected result is an override-redirect window in the top left corner of the screen showing "something black" on a yellow background. However, the actual result is white instead of black.
I *think* (but have no way to actually verify this) that this is because in xserver/exa/exa_glyphs.c the function exaGlyphs() ignores its "op" argument unless a mask format is specified. My test program does not use a mask.
A partial fix would be pass an operator to exaGlyphsToDst(). However, that could produce incorrect rendering with intermediate flushes and some operators that cannot easily split (e.g. Out).
Another possible fix could be to just use a temporary pixmap, even if no mask format was specified, when an operator other than Over is used (Over is hardcoded in exaGlyphsToDst()).
Since I cannot reproduce this problem myself, all of the above is just a theory.
Possible fix: https://patchwork.freedesktop.org/patch/79199/
One user in the original issue (https://github.com/i3/i3/issues/2248#issuecomment-204391320) stated that the fix works for them.
After building everything from source(xserver with this patch),I found that "slim" login manager froze.
Maybe some dependencies which depend on xserver aren't compatible with this patch...
By building everything and then rebuild xserver,it seemed to work.
(In reply to James from comment #3)
> After building everything from source(xserver with this patch),I found that
> "slim" login manager froze.
> Maybe some dependencies which depend on xserver aren't compatible with this
> By building everything and then rebuild xserver,it seemed to work.
Author: Michel Dänzer <email@example.com>
Date: Fri Apr 1 18:24:00 2016 +0900
EXA: Honour op parameter to exaGlyphs even if maskFormat == NULL