Skip to content

Change text over sixel image behaviour to be compatible with xterm

Matan Ziv-Av requested to merge matan/konsole:sixel-text into master

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:

Screenshot_20240928_135811.png

Konsole with this MR:

Screenshot_20240928_135938.png

xterm:

Screenshot_20240928_135648.png

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.

BUG: 456354

Merge request reports

Loading