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
|
|
@ -473,7 +473,7 @@ impl WinitUIWindow {
|
|||
|
||||
this.setRootViewController(Some(view_controller));
|
||||
|
||||
match window_attributes.fullscreen.clone().map(Into::into) {
|
||||
match window_attributes.fullscreen.0.clone().map(Into::into) {
|
||||
Some(Fullscreen::Exclusive(ref video_mode)) => {
|
||||
let monitor = video_mode.monitor();
|
||||
let screen = monitor.ui_screen(mtm);
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ impl Window {
|
|||
// TODO: transparency, visible
|
||||
|
||||
let main_screen = UIScreen::main(mtm);
|
||||
let fullscreen = window_attributes.fullscreen.clone().map(Into::into);
|
||||
let fullscreen = window_attributes.fullscreen.0.clone().map(Into::into);
|
||||
let screen = match fullscreen {
|
||||
Some(Fullscreen::Exclusive(ref video_mode)) => video_mode.monitor.ui_screen(mtm),
|
||||
Some(Fullscreen::Borderless(Some(ref monitor))) => monitor.ui_screen(mtm),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue