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: Fix state persisting when exiting on Linux #2895

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

flukejones
Copy link
Contributor

EventResult::Exit is hit before Event::LoopDestroyed is, and due to possibly some order of operations or drops the window is never destroyed on Linux. Adding a call to winit_app.save_and_destroy(); where EventResult::Exit is checked solves this.

Closes #2892

`EventResult::Exit` is hit before `Event::LoopDestroyed` is, and due to
possibly some order of operations or drops the window is never destroyed
on Linux. Adding a call to `winit_app.save_and_destroy();` where
`EventResult::Exit` is checked solves this.

Closes emilk#2892

Signed-off-by: Luke D. Jones <[email protected]>
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.

Thanks!

@emilk emilk merged commit 7c12bb6 into emilk:master Apr 18, 2023
TicClick pushed a commit to TicClick/egui that referenced this pull request Apr 18, 2023
…lk#2895)

`EventResult::Exit` is hit before `Event::LoopDestroyed` is, and due to
possibly some order of operations or drops the window is never destroyed
on Linux. Adding a call to `winit_app.save_and_destroy();` where
`EventResult::Exit` is checked solves this.

Closes emilk#2892

Signed-off-by: Luke D. Jones <[email protected]>
@emilk emilk added bug Something is broken eframe Relates to epi and eframe native-linux Problem specific to Linux labels Apr 18, 2023
@emilk emilk changed the title eframe: add call to save_and_destroy in Exit event of run_return eframe: Fix state persisting when exiting on Linux Apr 18, 2023
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 native-linux Problem specific to Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Window not destroyed after run_and_return
2 participants