mirror of
https://github.com/wez/wezterm.git
synced 2024-12-25 14:22:37 +03:00
wayland: set scale factor without wegl_surface (for WebGpu)
This fixes wrong scale with the WebGpu backend.
This commit is contained in:
parent
71ec5ac0a8
commit
6a47bbaf32
@ -682,8 +682,6 @@ impl WaylandWindowInner {
|
||||
// assume no.
|
||||
live_resizing: false,
|
||||
});
|
||||
if let Some(wegl_surface) = self.wegl_surface.as_mut() {
|
||||
wegl_surface.resize(pixel_width, pixel_height, 0, 0);
|
||||
// Avoid blurring by matching the scaling factor of the
|
||||
// compositor; if it is going to double the size then
|
||||
// we render at double the size anyway and tell it that
|
||||
@ -696,6 +694,9 @@ impl WaylandWindowInner {
|
||||
// We do this only if the scale has actually changed,
|
||||
// otherwise interactive window resize will keep removing
|
||||
// the window contents!
|
||||
if let Some(wegl_surface) = self.wegl_surface.as_mut() {
|
||||
wegl_surface.resize(pixel_width, pixel_height, 0, 0);
|
||||
}
|
||||
if self.surface_factor != factor {
|
||||
let wayland_conn = Connection::get().unwrap().wayland();
|
||||
let mut pool = wayland_conn.mem_pool.borrow_mut();
|
||||
@ -714,7 +715,6 @@ impl WaylandWindowInner {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
self.refresh_frame();
|
||||
self.do_paint().unwrap();
|
||||
|
Loading…
Reference in New Issue
Block a user