Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: store portal restore token under the right source ID #40192

Conversation

trop[bot]
Copy link
Contributor

@trop trop bot commented Oct 12, 2023

Backport of #40098

See that PR for details.

Notes: Fixed some redundant permission dialogs while screen sharing on Wayland.

XDG Desktop Portal provides restore tokens to restore a previously
selected PipeWire stream instead of prompting the user again. This
restore token is single use only and it has to be replaced when the
stream is completed/stopped.

BaseCapturerPipewire maintains two source IDs: one is initialized by
the constructor for new sources (source_id_) and another is for
capturing previously selected sources (selected_source_id_). The
restore token was always being stored under `source_id_`, even if the
capture was ongoing for `selected_source_id_`. This prevents a stream
from being restored more than once. Fix that by storing the restore
token under the selected source ID if it exists.

Co-authored-by: Athul Iddya <athul@iddya.com>
@trop trop bot requested a review from a team as a code owner October 12, 2023 11:18
@trop trop bot added 28-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Oct 12, 2023
@codebytere codebytere merged commit 6625666 into 28-x-y Oct 13, 2023
17 checks passed
@codebytere codebytere deleted the trop/28-x-y-bp-fix-store-portal-restore-token-under-the-right-source-id-1697109480664 branch October 13, 2023 20:09
@release-clerk
Copy link

release-clerk bot commented Oct 13, 2023

Release Notes Persisted

Fixed redundant permission dialogs while screen sharing on Wayland.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
28-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant