graphics/virtio-gpud: Create DisplayHandle after registering the scheme

This fixes a race-condition. It is unlikely to cause issues in practice
though.
This commit is contained in:
bjorn3
2025-06-29 18:06:22 +02:00
parent 7f5c58892c
commit 7f3f181775
+3 -6
View File
@@ -390,11 +390,8 @@ impl<'a> GpuScheme {
}
}
let inputd_handle = DisplayHandle::new("virtio-gpu").unwrap();
Ok((
GraphicsScheme::new(adapter, "display.virtio-gpu".to_owned()),
inputd_handle,
))
let scheme = GraphicsScheme::new(adapter, "display.virtio-gpu".to_owned());
let handle = DisplayHandle::new("virtio-gpu").unwrap();
Ok((scheme, handle))
}
}