Refactor SharedState so that it is no longer behind an Arc (#2573)
* Refactor SharedState so that it is no longer behind an Arc * Always use `Window::lock_shared_state`
This commit is contained in:
parent
32784af3c4
commit
2a58b785fe
4 changed files with 55 additions and 92 deletions
|
|
@ -57,10 +57,7 @@ declare_class!(
|
|||
this.map(|this| {
|
||||
let scale_factor = window.scale_factor();
|
||||
|
||||
Ivar::write(&mut this.window, unsafe {
|
||||
let window: *const WinitWindow = window;
|
||||
Id::retain(window as *mut WinitWindow).unwrap()
|
||||
});
|
||||
Ivar::write(&mut this.window, window.retain());
|
||||
Ivar::write(&mut this.initial_fullscreen, initial_fullscreen);
|
||||
Ivar::write(&mut this.previous_position, None);
|
||||
Ivar::write(&mut this.previous_scale_factor, scale_factor);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue