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

frontend-tools: Avoid initializing the scene switcher on Wayland #10877

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tytan652
Copy link
Collaborator

@tytan652 tytan652 commented Jun 18, 2024

Description

The Linux implementation of the automatic scene switcher is X11-only and the design itself of the feature is incompatible with how Wayland works.

Motivation and Context

If a user happen to have the scene switcher active, OBS will crash while freeing the tool under Wayland.

The saved configuration should be kept since we no longer create the scene collection JSON from scratch, so there is normally no loss.

How Has This Been Tested?

The scene switcher is no longer loaded on Wayland.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

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 Linux implementation of the automatic scene switcher is X11-only and
the design itself of the feature is incompatible with how Wayland works.
@tytan652 tytan652 added Bug Fix Non-breaking change which fixes an issue Linux Affects Linux labels Jun 18, 2024
@Fenrirthviti
Copy link
Member

For posterity, is this possible to fix on Wayland, or is there a fundamental missing functionality that prevents this from ever working? I understand disabling it fixes an immediate problem/crash, and a solution might take longer, but it's not clear if this is something that can be fixed or not.

If we're disabling features, I'd like to at least have an issue open (or discussion post) on what steps are required to re-enable it back to feature parity, if possible. High-level is fine, it does not need to be an exact technical roadmap.

@tytan652
Copy link
Collaborator Author

For posterity, is this possible to fix on Wayland, or is there a fundamental missing functionality that prevents this from ever working? I understand disabling it fixes an immediate problem/crash, and a solution might take longer, but it's not clear if this is something that can be fixed or not.

Under Wayland, application can't be aware of other application windows for multiple reason (e.g. security, avoid re-inventing X11).
Reminder, for Screen Capture we use portals so at no point OBS is aware of which application is selected.

This feature will never be possible on Wayland.

@Fenrirthviti
Copy link
Member

I don't quite agree with "never be possible" here, but it sounds like if Wayland offers a secure API at some point to provide window information, we can revisit this.

As it stands, Wayland doesn't provide the information that this features needs to function, so I'm fine disabling it there.

@GeorgesStavracas
Copy link
Member

This kind of interaction (listing other windows and accessing their state) isn't available in any existing Wayland protocols, and I think this is by design. Given the security requirements, this looks like something that should be provided by a portal.

Right now nothing exists in the Wayland / Portals platform that can enable this feature, so I think disabling it for the time being is all that OBS can do.

@RytoEX
Copy link
Member

RytoEX commented Jun 26, 2024

Just to confirm, this happens on 30.1.x and older, correct?

@GeorgesStavracas
Copy link
Member

Yes, it happens in all current and previous releases of OBS Studio.

@RytoEX
Copy link
Member

RytoEX commented Jun 26, 2024

Yes, it happens in all current and previous releases of OBS Studio.

Okay then. Based on that information, I'll set this aside until we get into the merge window for the next release. Thanks.

@tytan652 tytan652 added this to the OBS Studio 31 milestone Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Non-breaking change which fixes an issue Linux Affects Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants