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:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user