Skip to content

linux-pipewire: Defer screencast portal init until source is shown#13157

Open
avafloww wants to merge 1 commit intoobsproject:masterfrom
avafloww:fix/defer-portal-init
Open

linux-pipewire: Defer screencast portal init until source is shown#13157
avafloww wants to merge 1 commit intoobsproject:masterfrom
avafloww:fix/defer-portal-init

Conversation

@avafloww
Copy link

Description

The previous behaviour would attempt screencast portal initialization even when the source is not shown, which can cause a flood of pop-ups, each indistinguishable from each other, on startup.

This commit defers portal init until the first time the source is shown, so the user isn't flooded with pop-ups when starting OBS.

Motivation and Context

This change addresses the ideas.obsproject.com post found here: https://ideas.obsproject.com/posts/2318/do-not-open-screen-sharing-portals-on-startup

On KDE Wayland, all screencast portal requests open as a separate window, with no further information on which source the request belongs to. In setups with many capture sources across multiple scenes, this can easily result in 10-20+ picker windows all opening at startup, with no way to differentiate them.

How Has This Been Tested?

I built the OBS Flatpak with my code changes and tested it.
The screencast portal opens correctly when sources are shown, and the source shows correctly once a window is confirmed via the portal.

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

The previous behaviour would attempt screencast portal initialization
even when the source is not shown, which can cause a flood of pop-ups,
each indistinguishable from each other, on startup.

This commit defers portal init until the first time the source is
shown, so the user isn't flooded with pop-ups when starting OBS.
@WizardCM WizardCM added Enhancement Improvement to existing functionality Linux Affects Linux labels Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Improvement to existing functionality Linux Affects Linux

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants