mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
config: don't allow colors.flash-alpha to be 1.0
A compositor will not send a frame callback for our main window if it is fully occluded (for example, by a fully opaque overlay...). This causes the overlay to stuck. For regular buffers, it _should_ be enough to *not* hint the compositor it's opaque. But at least some compositor special cases single-pixel buffers, and actually look at their pixel value. Thus, we have two options: implement frame callback handling for the overlay sub-surface, or ensure we don't use a fully opaque surface. Since no overlays are fully opaque by default, and the flash surface is the only one that can be configured to be opaque (colors.flash-alpha), and since adding frame callback handling adds a lot of boilerplate code... let's go with the simpler solution of
This commit is contained in:
parent
c7ab7b3539
commit
56d2c3e990
3 changed files with 26 additions and 2 deletions
4
config.c
4
config.c
|
|
@ -1445,8 +1445,8 @@ parse_section_colors(struct context *ctx)
|
|||
if (!value_to_float(ctx, &alpha))
|
||||
return false;
|
||||
|
||||
if (alpha < 0. || alpha > 1.) {
|
||||
LOG_CONTEXTUAL_ERR("not in range 0.0-1.0");
|
||||
if (alpha < 0. || alpha >= 1.) {
|
||||
LOG_CONTEXTUAL_ERR("not in range 0.0-0.999");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue