Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing cursor properties while window is being resized crashes in browser #4110

Open
benjamin-sieffert opened this issue Feb 3, 2025 · 0 comments
Labels
B - bug Dang, that shouldn't have happened DS - web

Comments

@benjamin-sieffert
Copy link

benjamin-sieffert commented Feb 3, 2025

Description

Reproducer: https://github.com/benjamin-sieffert/curs-reprod

Calling cursor-related functions, e.g. set_cursor_visible while the browser window containing winit+wgpu application is being resized, leads to a panic. This happens even when the state of the cursor would not even change (e.g. always calling set_cursor_visible(true)).

The error is:
winit-0.30.8/src/platform_impl/web/event_loop/runner.rs:599:30 (already borrowed: BorrowMutError)

I understand that due to rendering and event delivery interfering with each other, it may not be possible to make this "work."
It would be nice if it did not panic. Some cursor functions also return ExternalError already, this could be used to signal failure instead of a panic.

Cheers

Tested browsers

Chrome, Firefox

Tested devices

Linux PC
Windows PC

Winit version

winit: 0.30.8
wgpu: 24.0.1

@benjamin-sieffert benjamin-sieffert added B - bug Dang, that shouldn't have happened DS - web labels Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B - bug Dang, that shouldn't have happened DS - web
Development

No branches or pull requests

1 participant