Change text over sixel image behaviour to be compatible with xterm
With this MR, if a character with the default background color is printed on a sixel image, the background color is displayed rather than considered transparent.
Current konsole:
Konsole with this MR:
xterm:
In more details: The "standard" (VT330/VT340 Programmer Reference Manual) does not define what happens when a character is printed on a sixel image. xterm
, and some other (maybe all?) terminals implementing sixel protocol chose to hide the image under the whole character cell. Konsole
always treated the default background color as transparent, which makes sense when there is a background image or when the terminal background is transparent. When implementing graphics I chose to use this behaviour, since it seems more flexible to me.
But, there are programs that depend on xterm behaviour, and I read complaints about this in various platforms.
For implementing this change it is necessary to store with each image its source protocol (since unlike sixel, kitty
protocol defines the behaviour as the one currently used in konsole
.) and when drawing the background of a character to be aware if there is a sixel image under it, in order to not change the behaviour for background image.