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

@ -18,7 +18,6 @@ use crate::platform_impl::{OsError, PlatformSpecificWindowBuilderAttributes};
use crate::window::{WindowAttributes, WindowId as RootWindowId};
use super::super::cursor::CursorHandler;
use super::super::event_loop::runner::WeakShared;
use super::super::main_thread::MainThreadMarker;
use super::super::WindowId;
use super::animation_frame::AnimationFrameHandler;
@ -71,7 +70,6 @@ pub struct Style {
impl Canvas {
pub(crate) fn create(
main_thread: MainThreadMarker,
runner: WeakShared,
id: WindowId,
window: web_sys::Window,
document: Document,
@ -111,7 +109,7 @@ impl Canvas {
let style = Style::new(&window, &canvas);
let cursor = CursorHandler::new(main_thread, runner, style.clone());
let cursor = CursorHandler::new(main_thread, canvas.clone(), style.clone());
let common = Common {
window: window.clone(),