mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
osc: update font subpixel mode, and window opaque compositor hint, on alpha changes
When background alpha is changed at runtime (using OSC-11), we (may) have to update the opaque hint we send to the compositor. We must also update the subpixel mode used when rendering font glyphs. Why? When the window is fully opaque, we use wl_surface_set_opaque_region() on the entire surface, to hint to the compositor that it doesn’t have to blend the window content with whatever is behind the window. Obviously, if alpha is changed from opaque, to transparent (or semi-transparent), that hint must be removed. Sub-pixel mode is harder to explain, but in short, we can’t do subpixel hinting with a (semi-)transparent background. Thus, similar to the opaque hint, subpixel antialiasing must be enabled/disabled when background alpha is changed.
This commit is contained in:
parent
134b54dfe0
commit
c51050a9bc
5 changed files with 32 additions and 12 deletions
|
|
@ -94,6 +94,7 @@ wayl_win_init(struct terminal *term, const char *token)
|
|||
}
|
||||
|
||||
void wayl_win_destroy(struct wl_window *win) {}
|
||||
void wayl_win_alpha_changed(struct wl_window *win) {}
|
||||
bool wayl_win_set_urgent(struct wl_window *win) { return true; }
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue