fix: crash while resizing on x11

This commit is contained in:
Hojjat 2026-05-20 00:25:37 -06:00 committed by Michael Murphy
parent 346faf2e79
commit 9ae155b8e2

View file

@ -368,6 +368,13 @@ pub fn present(
) -> Result<(), compositor::SurfaceError> {
match surface.get_current_texture() {
Ok(frame) => {
if frame.suboptimal
|| frame.texture.width() != viewport.physical_width()
|| frame.texture.height() != viewport.physical_height()
{
return Err(compositor::SurfaceError::Outdated);
}
let view = &frame
.texture
.create_view(&wgpu::TextureViewDescriptor::default());