Skip to content

frontend: Make projectors somewhat work on Wayland#11558

Closed
cg2121 wants to merge 1 commit intoobsproject:masterfrom
cg2121:kinda-fix-wayland-projectors
Closed

frontend: Make projectors somewhat work on Wayland#11558
cg2121 wants to merge 1 commit intoobsproject:masterfrom
cg2121:kinda-fix-wayland-projectors

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
@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.

@norihiro
Copy link
Contributor

The commit description below exceeds the 72-character limit.

This makes the projectors work on Wayland. The ability to set a fullscreen

@cg2121 cg2121 force-pushed the kinda-fix-wayland-projectors branch from 93f5c40 to e468044 Compare January 26, 2025 02:56
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 e468044 to 9174eb3 Compare January 26, 2025 02:56
@cg2121 cg2121 changed the title UI: Make projectors somewhat work on Wayland frontend: Make projectors somewhat work on Wayland Jan 26, 2025
@cg2121
Copy link
Contributor Author

cg2121 commented Jan 26, 2025

Updated to latest master

@kkartaltepe
Copy link
Collaborator

Found my old code, but after cleaning it up its really only some fixes to when we call show compared to the old code. Pushed it at #11773 , added your disable fullscreen/windowed switch since it seems like the only good choice on gnome...

@cg2121
Copy link
Contributor Author

cg2121 commented Jan 26, 2025

Closing, as #11773 is now submitted by @kkartaltepe.

@cg2121 cg2121 closed this Jan 26, 2025
@cg2121 cg2121 deleted the kinda-fix-wayland-projectors branch January 26, 2025 07:52
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.

6 participants