Skip to content

eframe: Fix state persisting when exiting on Linux#2895

Merged
emilk merged 1 commit intoemilk:masterfrom
flukejones:master
Apr 18, 2023
Merged

eframe: Fix state persisting when exiting on Linux#2895
emilk merged 1 commit intoemilk:masterfrom
flukejones:master

Conversation

@flukejones
Copy link
Copy Markdown
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 <luke@ljones.dev>
Copy link
Copy Markdown
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 <luke@ljones.dev>
@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