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

Fix: request_repaint_after works even when called from background thread #2939

Merged
merged 11 commits into from
Apr 20, 2023

Conversation

emilk
Copy link
Owner

@emilk emilk commented Apr 20, 2023

Closes #2674

The callback installed with Context::set_request_repaint_callback is now given a RequestRepaintInfo which contains an after: std::time::Duration specifying how long to wait until repainting. It is up to integration to heed this.

With eframe, both web and native now supports requesting repaints, with delay, from background threads and tasks.

@emilk emilk added bug Something is broken feature New feature or request eframe Relates to epi and eframe egui labels Apr 20, 2023
@emilk emilk merged commit 834e2e9 into master Apr 20, 2023
34 checks passed
@emilk emilk deleted the emilk/repaint-after branch April 20, 2023 08:56
@dnsco
Copy link

dnsco commented Apr 28, 2023

@emilk is there any way you could cut a release with this fix please? We're having issues with our build infra + git dependencies so it would be very helpful if we could just point at a released version.

Thanks for all your work on this awesome library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken eframe Relates to epi and eframe egui feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Context::request_repaint_after doesn't repaint unless the mouse is moving
2 participants