Skip to content

feat(linux/xdgportal): Add support for pipewire-serial#5060

Merged
ReenigneArcher merged 1 commit into
LizardByte:masterfrom
Kishi85:draft-xdgportal-pipewire-serial
Jun 23, 2026
Merged

feat(linux/xdgportal): Add support for pipewire-serial#5060
ReenigneArcher merged 1 commit into
LizardByte:masterfrom
Kishi85:draft-xdgportal-pipewire-serial

Conversation

@Kishi85

@Kishi85 Kishi85 commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Description

This is a PR to implement the upcoming changes on XDG portal to utilize pipewire-serial for stream selection instead of pipewire's node id. For more information see: flatpak/xdg-desktop-portal#979

The groundwork for using object serial with pipewire.cpp was done in #5054. This PR contains the changes to pass the serial received from XDG portal forward to pipewire_display_t.

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

@Kishi85

Kishi85 commented Apr 29, 2026

Copy link
Copy Markdown
Contributor Author

Let's leave this as a draft for now until the changes are merged to/available on xdg-desktop-portal and this can be properly tested.

@Kishi85 Kishi85 force-pushed the draft-xdgportal-pipewire-serial branch from d04bca7 to a9e9764 Compare April 29, 2026 13:03
@sonarqubecloud

Copy link
Copy Markdown

@ReenigneArcher ReenigneArcher added this to the xdg portal grab milestone Apr 29, 2026
@Kishi85

Kishi85 commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

xdg-desktop-portal support for pipewire serial has been merged as of pre-release 1.21.2: https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.21.2

Implementing backends will still need to be updated so it'll likely be the next stable release that will be easily testable.

@Kishi85 Kishi85 force-pushed the draft-xdgportal-pipewire-serial branch from a9e9764 to 0d869d4 Compare June 19, 2026 08:52
@Kishi85

Kishi85 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

KWin 6.7.0 finally supports pipewire objectserial (working great with kwingrab) but xdg-desktop-portal-kde still needs to be updated as that is still not returning a value for pipewire-serial yet.

Looks like I'll have to look at other implementations just to test this so we can finally merge it. Thankfully the underlying changes to pipewire.cpp's connection handling are already validated and working properly (using kwingrab).

@Kishi85 Kishi85 force-pushed the draft-xdgportal-pipewire-serial branch 2 times, most recently from 418f658 to 988e5a1 Compare June 20, 2026 11:09
@Kishi85

Kishi85 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

I'll mark this as ready for review as it should work from what is in the portal documentation. I still haven't found any portal implementation that actually provides this on an available version but the pipewire part I've been able to test using kwingrab and the portal adaption is just adding another parameter read from the portal (that currently fails and sets the necessary invalid indicator for object serial).

If merged after #5302 any major issues that can still occur should be transparently handled by the fallback to node id implemented there.

@Kishi85 Kishi85 marked this pull request as ready for review June 20, 2026 11:13
@ReenigneArcher ReenigneArcher force-pushed the draft-xdgportal-pipewire-serial branch from 988e5a1 to 4870dba Compare June 23, 2026 12:42
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.85%. Comparing base (16ced8f) to head (4870dba).
⚠️ Report is 3 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/linux/portalgrab.cpp 0.00% 9 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5060      +/-   ##
==========================================
- Coverage   17.86%   17.85%   -0.02%     
==========================================
  Files         111      111              
  Lines       24596    24602       +6     
  Branches    10890    10892       +2     
==========================================
- Hits         4395     4393       -2     
+ Misses      17811    15908    -1903     
- Partials     2390     4301    +1911     
Flag Coverage Δ
Archlinux 11.18% <0.00%> (-0.01%) ⬇️
FreeBSD-aarch64 ?
FreeBSD-amd64 13.23% <0.00%> (+<0.01%) ⬆️
Homebrew-ubuntu-24.04 13.22% <0.00%> (-0.01%) ⬇️
Linux-AppImage 12.11% <0.00%> (-0.01%) ⬇️
Windows-AMD64 14.91% <ø> (ø)
Windows-ARM64 13.20% <ø> (-0.01%) ⬇️
macOS-arm64 19.13% <ø> (ø)
macOS-x86_64 18.61% <ø> (ø)

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

Files with missing lines Coverage Δ
src/platform/linux/portalgrab.cpp 18.32% <0.00%> (-0.26%) ⬇️

... and 65 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 16ced8f...4870dba. Read the comment docs.

@ReenigneArcher ReenigneArcher merged commit 2438a9b into LizardByte:master Jun 23, 2026
62 of 64 checks passed
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants