mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
term: stash last known DPI, and use after a unmapped/mapped sequence
A compositor may unmap, and then remap the window, for example when the window is minimized, or if the user switches workspace. With DPI aware rendering, we *need* to know on which output we're mapped, in order to use the correct DPI. This means the first frame we render, before being mapped, always guesses the DPI. In an unmap/map sequence, guessing the wrong DPI means the window will flicker. Fix by stashing the last used DPI value, and use that instead of guessing. This means the *only* time we _actually_ guess the DPI, is the very first frame, when starting up foot.
This commit is contained in:
parent
a5b369ede4
commit
7c20fb247c
3 changed files with 25 additions and 3 deletions
|
|
@ -406,6 +406,7 @@ struct terminal {
|
|||
struct config_font *font_sizes[4];
|
||||
struct pt_or_px font_line_height;
|
||||
float font_dpi;
|
||||
float font_dpi_before_unmap;
|
||||
bool font_is_sized_by_dpi;
|
||||
int16_t font_x_ofs;
|
||||
int16_t font_y_ofs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue