fix(wayland): use the current wl_output mode - #5150
Conversation
|
|
Thank you for the PR submission, but I noticed you didn't use our PR template. Please update the PR to use the correct template. You can find it at https://github.com/LizardByte/.github/blob/master/.github/pull_request_template.md?plain=1 |
|
@ReenigneArcher Done. |
|
It looks like this PR has been idle for 90 days. If it's still something you're working on or would like to pursue, please leave a comment or update your branch. Otherwise, we'll be closing this PR in 10 days to reduce our backlog. Thanks! |
wl_output.mode is emitted for every advertised mode, not just the active one. The current code overwrites viewport.width and viewport.height on every mode event, which can leave Sunshine latched to a supported mode instead of the current mode. When that happens, wlgrab sees every captured frame as a size mismatch and reinitializes endlessly. Track the compositor's current mode explicitly and only fall back to the first advertised mode until a current one is seen. Signed-off-by: Zach Denton <z@chdenton.com>
418fa2f to
3956142
Compare
Bundle ReportBundle size has no change ✅ |
Only apply wl_output mode updates when the compositor marks them as current, preventing stale advertised modes from overwriting the active resolution. Remove the now-unneeded current-mode tracking flag and add unit tests covering ignored non-current modes and current-mode updates.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5150 +/- ##
=========================================
Coverage 32.45% 32.45%
=========================================
Files 104 104
Lines 24998 25000 +2
Branches 11078 11077 -1
=========================================
+ Hits 8112 8113 +1
+ Misses 15052 13937 -1115
- Partials 1834 2950 +1116
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 58 files with indirect coverage changes Continue to review full report in Codecov by Harness.
|
|
Screenshot ComparisonPR #5150 screenshots vs Matrix:
|









































































Description
wl_output.modeis emitted for every advertised mode, not just the active one.The current code overwrites
viewport.widthandviewport.heighton every mode event, which can leave Sunshine latched to a supported mode instead of the current mode.When that happens,
wlgrabsees every captured frame as a size mismatch and reinitializes endlessly.This tracks the compositor's current mode explicitly and only falls back to the first advertised mode until a current one is seen.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage