wayland: improve deinit and init - #1458
Merged
Merged
Conversation
Improve the wayland deinit and init process to fix problems after running deinit followed by init in case of a reload. Furthermore destroy otherwise leaked objects and clear associated pointers to prevent potential use after free bugs. This change fixes dunst from breaking sometimes, when a reload is triggered while a notification is displayed. This issue happed because of either ctx.dirty not being cleared, which causes an set_dirty to do an early exit without scheduling a frame to the surface. Or because the frame_callback was not being cleared, which prevented further surface commits, as the callback would never be triggered after the surface was destroyed by the deinit process. Fixes dunst-project#1434
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1458 +/- ##
==========================================
- Coverage 65.57% 65.48% -0.10%
==========================================
Files 50 50
Lines 8910 8923 +13
Branches 1043 1045 +2
==========================================
Hits 5843 5843
- Misses 3067 3080 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Can be merged, see #1434 (comment) |
Contributor
|
thank you sven for your work ❤️ |
3 of 13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve the wayland deinit and init process to fix problems after running deinit followed by init in case of a reload. Furthermore destroy otherwise leaked objects and clear associated pointers to prevent potential use after free bugs.
This change fixes dunst from breaking sometimes, when a reload is triggered while a notification is displayed. This issue happed because of either ctx.dirty not being cleared, which causes an set_dirty to do an early exit without scheduling a frame to the surface. Or because the frame_callback was not being cleared, which prevented further surface commits, as the callback would never be triggered after the surface was destroyed by the deinit process.
Fixes #1434