mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
Web Async Rework (#3082)
This commit is contained in:
committed by
Kirill Chibisov
parent
f3fb27c17b
commit
70e6ddd210
@@ -1,6 +1,5 @@
|
||||
use std::cell::Cell;
|
||||
use std::rc::{Rc, Weak};
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use smol_str::SmolStr;
|
||||
@@ -29,7 +28,7 @@ use super::{event, ButtonsState, ResizeScaleHandle};
|
||||
pub struct Canvas {
|
||||
common: Common,
|
||||
id: WindowId,
|
||||
pub has_focus: Arc<AtomicBool>,
|
||||
pub has_focus: Rc<Cell<bool>>,
|
||||
pub is_intersecting: Option<bool>,
|
||||
on_touch_start: Option<EventListenerHandle<dyn FnMut(Event)>>,
|
||||
on_focus: Option<EventListenerHandle<dyn FnMut(FocusEvent)>>,
|
||||
@@ -139,7 +138,7 @@ impl Canvas {
|
||||
Ok(Canvas {
|
||||
common,
|
||||
id,
|
||||
has_focus: Arc::new(AtomicBool::new(false)),
|
||||
has_focus: Rc::new(Cell::new(false)),
|
||||
is_intersecting: None,
|
||||
on_touch_start: None,
|
||||
on_blur: None,
|
||||
|
||||
Reference in New Issue
Block a user