fix(wayland): retain output modes until finished - #3788
Merged
ItsLemmy merged 1 commit intoAug 4, 2026
Conversation
ItsLemmy
force-pushed
the
fix/wayland-output-mode-lifetime
branch
from
August 4, 2026 01:08
128e119 to
3626a81
Compare
Collaborator
|
Thanks a lot, I got hit by the bug and started fixing before seeing your PR. |
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.
Summary
Retain
zwlr_output_mode_v1proxies until their Wayland lifecycle ends instead of releasing them immediately when announced.Motivation
Commit
489de6f76introduced immediate mode-proxy release while adding monitor serial-number support.A compositor may reference an announced mode in subsequent events such as
current_mode. On Niri, this caused libwayland to abort during startup:Mode proxies are now tracked independently from output heads and released when:
finishedIndependent tracking avoids relying on cross-object ordering between mode and head
finishedevents.Type of Change
Related Issue
N/A
Testing
meson setup build-debug --wipe -Dtests=enabled --buildtype=debug meson compile -C build-debug meson test -C build-debug --print-errorlogs just formatAll 68 tests passed. The original startup crash was reproduced, and initialization completed successfully with mode proxies retained on Niri 26.04.
Manual Coverage
Screenshots / Videos
Not applicable; this change has no visual or UI behavior.
Checklist
CONTRIBUTING.md.just formatwith clang-format v22+ installed, or this PR has no code changes.assets/translations/en.json, or this PR adds no new user-facing strings.