Skip to content

wayland: improve deinit and init - #1458

Merged
bynect merged 1 commit into
dunst-project:masterfrom
pslldq:fixwlreload
Mar 20, 2025
Merged

bynect merged 1 commit into
dunst-project:masterfrom
pslldq:fixwlreload

Conversation

@pslldq

@pslldq pslldq commented Mar 17, 2025

Copy link
Copy Markdown
Contributor

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

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-commenter

codecov-commenter commented Mar 17, 2025 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.48%. Comparing base (ad210bb) to head (093e94e).
⚠️ Report is 145 commits behind head on master.

Files with missing lines Patch % Lines
src/wayland/wl.c 0.00% 10 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
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     
Flag Coverage Δ
unittests 65.48% <0.00%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pslldq

pslldq commented Mar 20, 2025

Copy link
Copy Markdown
Contributor Author

Can be merged, see #1434 (comment)

@bynect

bynect commented Mar 20, 2025

Copy link
Copy Markdown
Contributor

thank you sven for your work ❤️

@bynect
bynect merged commit e4eedd9 into dunst-project:master Mar 20, 2025
@pslldq
pslldq deleted the fixwlreload branch March 21, 2025 08:59
@fxzzi fxzzi mentioned this pull request May 11, 2025
3 of 13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dunstctl reload from #1350 stops dunst from working on native wayland

3 participants