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: Abandon context if not current when closing the app #355

Merged
merged 5 commits into from
Dec 31, 2023

Conversation

marc2332
Copy link
Owner

@marc2332 marc2332 commented Oct 22, 2023

No description provided.

@codecov
Copy link

codecov bot commented Oct 22, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (74ee720) 53.11% compared to head (233300a) 53.08%.

Files Patch % Lines
crates/renderer/src/window.rs 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #355      +/-   ##
==========================================
- Coverage   53.11%   53.08%   -0.03%     
==========================================
  Files         147      147              
  Lines       12989    12996       +7     
==========================================
  Hits         6899     6899              
- Misses       6090     6097       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marc2332 marc2332 marked this pull request as ready for review October 23, 2023 06:16
@marc2332 marc2332 marked this pull request as draft October 23, 2023 06:16
@@ -46,6 +47,14 @@ pub struct WindowEnv<T: Clone> {
pub(crate) window_config: WindowConfig<T>,
}

impl<T: Clone> Drop for WindowEnv<T> {
fn drop(&mut self) {
if !self.gl_context.is_current() {

Choose a reason for hiding this comment

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

I suggest to try to make the context current and only abandon if making it current fails.

@marc2332 marc2332 added this to the 0.2.0 milestone Nov 13, 2023
@marc2332 marc2332 marked this pull request as ready for review December 22, 2023 18:09
@marc2332 marc2332 merged commit 0a59162 into main Dec 31, 2023
12 of 13 checks passed
@marc2332 marc2332 deleted the fix/abandon-context-if-not-current-when-closing-app branch December 31, 2023 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants