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

UI: Set WA_PaintOnScreen for projectors only on X11 to avoid crash on Wayland #11556

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

Conversation

OchiLive
Copy link

Description

Only set the "Qt::WA_PaintOnScreen" attribute on windowed projectors when running on X11, but not when running on Wayland.

Motivation and Context

As discussed in issue #11022 OBS crashes on certain Wayland compositors when explicit sync is in use. In the issue, the aforementioned attribute was mentioned as a possible culprit. In my testing on KDE Plasma 6.2.3, it turns out that:

  • In X11, setting the attribute seems to be necessary - otherwise OBS hangs while resizing the projector.
  • In Wayland, setting the attribute causes a crash. However, not setting the attribute works fine for me.

I therefore set the attribute conditionally only when running on X11.

How Has This Been Tested?

Tested on KDE Plasma 6.2.3 with NVIDIA driver 565.57.01 on Arch Linux in X11 and Wayland mode. Please feel free to test on other Wayland compositors if you can.

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.

UI/window-projector.cpp Outdated Show resolved Hide resolved
Setting the attribute on Wayland causes a crash when explicit sync
is used.
@OchiLive OchiLive force-pushed the wayland-window-projector-fix branch from 3bf739e to 90fa51e Compare November 23, 2024 12:59
@kkartaltepe
Copy link
Collaborator

This is still incredibly broken on wayland and why I have not sent this myself. If you only open a projector yes it may appear to be fine.

@OchiLive
Copy link
Author

@kkartaltepe Could very well be an instance of "works (only) for me", but I couldn't find the downsides of the change yet. Do you have a specific repro where it shows that it is broken?

@cg2121 cg2121 added the Bug Fix Non-breaking change which fixes an issue label Nov 23, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants