On Web, implement DeviceEvents (#2871)

This commit is contained in:
daxpedda 2023-06-14 10:26:26 +02:00 committed by GitHub
parent 9a9c9b15ba
commit 6300cf915e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 405 additions and 85 deletions

View file

@ -51,12 +51,12 @@ impl Window {
let register_redraw_request = Box::new(move || runner.request_redraw(RootWI(id)));
let has_focus = Arc::new(AtomicBool::new(false));
target.register(&canvas, id, prevent_default, has_focus.clone());
target.register(&canvas, id, prevent_default);
let runner = target.runner.clone();
let destroy_fn = Box::new(move || runner.notify_destroy_window(RootWI(id)));
let has_focus = canvas.borrow().has_focus.clone();
let window = Window {
id,
has_focus,