mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-16 22:05:21 -05:00
output: track output we're mapped on, and use maximum scale
Our surface may be on multiple outputs at the same time. In this case, we use the largest scale factor, and let the compositor down scale on the "other" output(s).
This commit is contained in:
parent
4b06360681
commit
c2451e2a80
4 changed files with 67 additions and 8 deletions
13
render.c
13
render.c
|
|
@ -675,8 +675,19 @@ reflow(struct row **new_grid, int new_cols, int new_rows,
|
|||
|
||||
/* Move to terminal.c? */
|
||||
void
|
||||
render_resize(struct terminal *term, int width, int height, int scale)
|
||||
render_resize(struct terminal *term, int width, int height)
|
||||
{
|
||||
int scale = -1;
|
||||
tll_foreach(term->wl.on_outputs, it) {
|
||||
if (it->item->scale > scale)
|
||||
scale = it->item->scale;
|
||||
}
|
||||
|
||||
if (scale == -1) {
|
||||
/* Haven't 'entered' an output yet? */
|
||||
scale = 1;
|
||||
}
|
||||
|
||||
width *= term->scale;
|
||||
height *= term->scale;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue