Web: improve custom cursor handling and add animated cursors (#3384)

This commit is contained in:
daxpedda 2024-01-12 11:51:19 +01:00 committed by GitHub
parent bdeb2574dc
commit 169cd39f93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 1086 additions and 420 deletions

View file

@ -6,7 +6,7 @@ use std::sync::OnceLock;
use wasm_bindgen::prelude::wasm_bindgen;
use wasm_bindgen::{JsCast, JsValue};
use super::r#async::{self, AsyncSender};
use super::r#async::{self, Sender};
thread_local! {
static MAIN_THREAD: bool = {
@ -85,7 +85,7 @@ impl<T> Drop for MainThreadSafe<T> {
unsafe impl<T> Send for MainThreadSafe<T> {}
unsafe impl<T> Sync for MainThreadSafe<T> {}
static DROP_HANDLER: OnceLock<AsyncSender<DropBox>> = OnceLock::new();
static DROP_HANDLER: OnceLock<Sender<DropBox>> = OnceLock::new();
struct DropBox(#[allow(dead_code)] Box<dyn Any>);