Skip to content

Conversation

@juliosanz
Copy link
Contributor

Description

Implements better, more complete support for logical sizes following up PR #4594, fixing issue #4599 and enhancing support for touchscreens when using multiple scaled monitors in Wayland (#2166).

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

❌ Patch coverage is 5.00000% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.43%. Comparing base (ff770d6) to head (cc53a1c).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/input.cpp 0.00% 16 Missing ⚠️
src/video.cpp 0.00% 12 Missing ⚠️
src/platform/linux/kmsgrab.cpp 20.00% 8 Missing ⚠️
src/platform/linux/wayland.cpp 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4607      +/-   ##
==========================================
- Coverage   15.51%   15.43%   -0.08%     
==========================================
  Files          94       94              
  Lines       19025    19058      +33     
  Branches     8769     8775       +6     
==========================================
- Hits         2951     2941      -10     
+ Misses      14946    14334     -612     
- Partials     1128     1783     +655     
Flag Coverage Δ
Archlinux 11.52% <0.00%> (-0.02%) ⬇️
FreeBSD-14.3-aarch64 ?
FreeBSD-14.3-amd64 13.79% <0.00%> (-0.03%) ⬇️
Homebrew-ubuntu-22.04 13.28% <6.25%> (-0.02%) ⬇️
Linux-AppImage 11.84% <6.25%> (-0.01%) ⬇️
Windows-AMD64 13.46% <0.00%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
src/input.h 0.00% <ø> (ø)
src/platform/common.h 28.84% <ø> (ø)
src/platform/linux/wayland.cpp 3.00% <0.00%> (ø)
src/platform/linux/kmsgrab.cpp 3.87% <20.00%> (+0.19%) ⬆️
src/video.cpp 29.19% <0.00%> (-0.40%) ⬇️
src/input.cpp 0.11% <0.00%> (-0.01%) ⬇️

... and 35 files with indirect coverage changes

@Dregu
Copy link
Contributor

Dregu commented Jan 21, 2026

Tested kms, works properly again with 2x scaling.

wlr however also doesn't work on scaled monitors now, only showing black screen and sunshine going in an endless loop of restarting the encoder. Scaled wlr worked fine on cf7b0dc.

@codecov
Copy link

codecov bot commented Jan 21, 2026

Bundle Report

Bundle size has no change ✅

@juliosanz
Copy link
Contributor Author

Just posted a new commit that should fix compatibility with other capture methods.

If you notice anything else @Dregu could you please attach Sunshine logs? Thank you in advance!

@Dregu
Copy link
Contributor

Dregu commented Jan 21, 2026

This change from the previous pr is actually the issue and that resolution then gets used by wlgrab https://github.com/LizardByte/Sunshine/pull/4594/changes#diff-e26c5ae6fcf2fcb3435e6cafe5f2e3ce373dada1e442ec74dd945ac0fdfa2621R147-R148

@juliosanz
Copy link
Contributor Author

Thanks for noticing that! I already fixed it. Now viewport.width and height are untouched, which should make things right.

@Dregu
Copy link
Contributor

Dregu commented Jan 21, 2026

Thanks for noticing that! I already fixed it. Now viewport.width and height are untouched, which should make things right.

Indeed, all screens seem to be streaming again in wlr and kms.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
9 New issues
9 New Code Smells (required ≤ 0)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@ReenigneArcher ReenigneArcher merged commit aca5d23 into LizardByte:master Jan 21, 2026
51 of 53 checks passed
@XT-Martinez
Copy link

XT-Martinez commented Feb 4, 2026

Hi @ReenigneArcher @juliosanz
I tried the latest nightly build 2026.203.160441 which indicates that this PR has been included.
However, the screen capture is still cropped if there is scaling and touch inputs are not working.

I'm using the new XDG Screen Capture btw.

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.

After added support for logical screen size with zxdg_output_v1, double-scaled screen in Moonlight

4 participants