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: Make projectors somewhat work on Wayland #11558

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

Conversation

cg2121
Copy link
Contributor

@cg2121 cg2121 commented Nov 24, 2024

Description

This makes the projectors work on Wayland. The ability to set a fullscreen projector windowed and vice-versa is disabled, as Wayland doesn't really support resizing windows from code.

Motivation and Context

Original PR by @kkartaltepe #6357

How Has This Been Tested?

Make projectors usable 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.

@WizardCM WizardCM added Bug Fix Non-breaking change which fixes an issue Enhancement Improvement to existing functionality Linux Affects Linux labels Nov 24, 2024
UI/window-projector.cpp Outdated Show resolved Hide resolved
This makes the projectors work on Wayland. The ability to set a fullscreen
projector windowed and vice-versa is disabled, as Wayland doesn't really
support resizing windows from code.
@cg2121 cg2121 force-pushed the kinda-fix-wayland-projectors branch from 572fba9 to 93f5c40 Compare November 24, 2024 00:16
@kkartaltepe
Copy link
Collaborator

If we are going to disable fullscreen on wayland I have a newer better version of this somewhere.

@cg2121
Copy link
Contributor Author

cg2121 commented Nov 24, 2024

To be clear, this just disables the right click menu options, in the projector window, of changing to fullscreen or windowed.

@kkartaltepe
Copy link
Collaborator

Right, I wasnt clear but that is what i meant.

@OchiLive
Copy link

This also appears to fix the "explicit sync" crash for me, even without the change from #11556.

I'd like to point out though that the "Fullscreen" and "Windowed" context menu entries seemed to work fine for me with kwin and labwc, so maybe that's specific to certain Wayland compositors. Out of curiosity, in which compositors do you have issues with those menu options?

I personally don't care much about those menu options though, so if this is a more general fix or workaround for more Wayland compositors, that's great.

@cg2121
Copy link
Contributor Author

cg2121 commented Nov 24, 2024

The projector problems, I've been seeing, happen on Gnome with Mutter.

@OchiLive
Copy link

@cg2121 Ah okay, that's interesting. I gave Gnome 47 in Wayland mode a quick try on my machine. Without any patches, the stable version of OBS crashes with the same explicit sync error as it does in KDE. With #11556 applied, I think I see what you mean, the projector window is missing its decoration (the context menu entries for fullscreen/windowed appear to work though). With your pull request applied it works better and does show the window decorations. I guess the behavior somewhat depends on the specific Wayland compositor.

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 Enhancement Improvement to existing functionality Linux Affects Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants