mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-21 05:33:45 -04:00
render: better description of why we disable transparency in fullscreen
This commit is contained in:
parent
5c58fc2a28
commit
4cf2c45baa
1 changed files with 23 additions and 13 deletions
36
render.c
36
render.c
|
|
@ -529,22 +529,32 @@ render_cell(struct terminal *term, pixman_image_t *pix, pixman_region32_t *damag
|
||||||
/*
|
/*
|
||||||
* Note: disable transparency when fullscreened.
|
* Note: disable transparency when fullscreened.
|
||||||
*
|
*
|
||||||
* This is because the wayland protocol recommends
|
* This is because the wayland protocol mandates no
|
||||||
* (mandates even?) the compositor render a black
|
* screen content is shown behind the fullscreened
|
||||||
* background behind fullscreened transparent windows.
|
* window.
|
||||||
*
|
*
|
||||||
* In other words, transparency does not work when
|
* The _intent_ of the specification is that a black
|
||||||
* fullscreened, in the sense that you don't see
|
* (or other static color) should be used as
|
||||||
* what's behind the window.
|
* background.
|
||||||
*
|
*
|
||||||
* And if we keep our alpha channel, the background
|
* There's a bit of gray area however, and some
|
||||||
* color will just look weird. For example, if the
|
* compositors have chosen to interpret the
|
||||||
* background color is white, and alpha is 0.5, then
|
* specification in a way that allows wallpapers to be
|
||||||
* the window will be drawn in a shade of gray while
|
* seen through a fullscreen window.
|
||||||
* fullscreened.
|
|
||||||
*
|
*
|
||||||
* By disabling the alpha channel, the window will at
|
* Given that a) the intent of the specification, and
|
||||||
* least be rendered in the intended background color.
|
* b) we don't know what the compositor will do, we
|
||||||
|
* simply disable transparency while in fullscreen.
|
||||||
|
*
|
||||||
|
* To see why, consider what happens if we keep our
|
||||||
|
* transparency. For example, if the background color
|
||||||
|
* is white, and alpha is 0.5, then the window will be
|
||||||
|
* drawn in a shade of gray while fullscreened.
|
||||||
|
*
|
||||||
|
* See
|
||||||
|
* https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/116
|
||||||
|
* for a discussion on whether transparent, fullscreen
|
||||||
|
* windows should be allowed in some way or not.
|
||||||
*
|
*
|
||||||
* NOTE: if changing this, also update render_margin()
|
* NOTE: if changing this, also update render_margin()
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue