mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
wayland: only use the surface preferred scale if set by the compositor
Before this patch, we would, in some cases, fallback to the surface preferred (not fractional) scaling, even though the compositor hadn't actually published a preferred buffer scale; the presence of a v6 compositor interface doesn't mean we've actually received a preferred scale yet.
This commit is contained in:
parent
4f1aaccf81
commit
88a3b54ca3
2 changed files with 1 additions and 5 deletions
|
|
@ -2125,7 +2125,7 @@ term_fractional_scaling(const struct terminal *term)
|
|||
bool
|
||||
term_preferred_buffer_scale(const struct terminal *term)
|
||||
{
|
||||
return term->wl->has_wl_compositor_v6;
|
||||
return term->wl->has_wl_compositor_v6 && term->window->preferred_buffer_scale > 0;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -1738,10 +1738,6 @@ wayl_win_init(struct terminal *term, const char *token)
|
|||
win->fractional_scale, &fractional_scale_listener, win);
|
||||
}
|
||||
|
||||
if (wayl->has_wl_compositor_v6) {
|
||||
win->preferred_buffer_scale = 1;
|
||||
}
|
||||
|
||||
win->xdg_surface = xdg_wm_base_get_xdg_surface(wayl->shell, win->surface.surf);
|
||||
xdg_surface_add_listener(win->xdg_surface, &xdg_surface_listener, win);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue