Make WindowBuilder Send + Sync
Window builder is always accessed by winit on the thread event loop is on, thus it's safe to mark the data it gets as `Send + Sync`. Each unsafe object is marked individually as `Send + Sync` instead of just implementing `Send` and `Sync` for the whole builder.
This commit is contained in:
parent
3ad64fb811
commit
801fddbfcf
14 changed files with 72 additions and 47 deletions
|
|
@ -63,7 +63,7 @@ impl Canvas {
|
|||
attr: &WindowAttributes,
|
||||
platform_attr: PlatformSpecificWindowBuilderAttributes,
|
||||
) -> Result<Self, RootOE> {
|
||||
let canvas = match platform_attr.canvas {
|
||||
let canvas = match platform_attr.canvas.0 {
|
||||
Some(canvas) => canvas,
|
||||
None => document
|
||||
.create_element("canvas")
|
||||
|
|
@ -127,7 +127,7 @@ impl Canvas {
|
|||
super::set_canvas_position(&common.document, &common.raw, &common.style, position);
|
||||
}
|
||||
|
||||
if attr.fullscreen.is_some() {
|
||||
if attr.fullscreen.0.is_some() {
|
||||
common.fullscreen_handler.request_fullscreen();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue