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

eframe: Sleep a bit only when minimized #3139

Merged
merged 1 commit into from
Jul 10, 2023
Merged

eframe: Sleep a bit only when minimized #3139

merged 1 commit into from
Jul 10, 2023

Conversation

icedrocket
Copy link
Contributor

The current eframe implementation sleeps 10ms for each frame when the window is not focused. This is likely due to the fact that when this feature was added, winit was not a dependency package, so there was no way to check if the window was minimized.

While this behavior has its advantages, it's frustrating for developers who want a smooth UI experience, so it would be nice to add an optional frame limit feature in each situation in the future instead.

Related Issue: #325

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!

I've tested on Mac, and it works well.

@emilk emilk added the eframe Relates to epi and eframe label Jul 10, 2023
@emilk emilk merged commit 2a2529b into emilk:master Jul 10, 2023
18 of 19 checks passed
@emilk emilk changed the title eframe: sleep a bit only when minimized eframe: Sleep a bit only when minimized Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eframe Relates to epi and eframe
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants