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

Projector window - no titlebar (Wayland, Gnome) #6283

Open
Pshemas opened this issue Apr 6, 2022 · 9 comments · May be fixed by #11773
Open

Projector window - no titlebar (Wayland, Gnome) #6283

Pshemas opened this issue Apr 6, 2022 · 9 comments · May be fixed by #11773
Labels
Confirmed This bug report has been confirmed by project members Linux Affects Linux

Comments

@Pshemas
Copy link

Pshemas commented Apr 6, 2022

Operating System Info

Other

Other OS

Linux

OBS Studio Version

27.2.4

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/xV__iKzOBdld9tor

OBS Studio Crash Log URL

No response

Expected Behavior

After launching projector window it should have a titlebar with proper window controls.

Current Behavior

It opens window without decoration / controls of any sorts.

Steps to Reproduce

  1. Create a screen / window capture.
  2. Launch preview window

Anything else we should know?

No response

@WizardCM
Copy link
Member

WizardCM commented Apr 6, 2022

Is this for a projector window?

@Pshemas
Copy link
Author

Pshemas commented Apr 6, 2022

Yes, it is projector window (sorry, my mistake in translation - I'm using pl_PL locales, I've noticed that in the en version it is called projector only after launching with LC_ALL=C).

@kkartaltepe
Copy link
Collaborator

Cannot replicate on gnome 41

@kkartaltepe
Copy link
Collaborator

Sorry it looks like I hit a different issue that prevented me from loading on wayland correctly. I did replicate this issue on gnome 42.

@kkartaltepe kkartaltepe reopened this Apr 7, 2022
@tytan652
Copy link
Collaborator

tytan652 commented Apr 8, 2022

Can also happen when undocking docks even if we can't redock them back.

Screenshot from 2022-04-08 09-17-01
The controls dock was already undocked, the transitions one is the example.

@kkartaltepe
Copy link
Collaborator

Upstream doesnt seem to care about supporting docks on wayland so there is not much we can do there beyond make tickets for Qt. The projector window is our own code.

@kkartaltepe kkartaltepe changed the title Preview window - no titlebar (Wayland, Gnome) Projector window - no titlebar (Wayland, Gnome) Apr 8, 2022
kkartaltepe added a commit to kkartaltepe/obs-studio that referenced this issue Apr 20, 2022
Previously OBSProjector was a subclass of OBSQTDisplay, which is
intended to own the entire surface it draws on. On wayland some
compositors expect the client to draw decorations (window titlebar), but
because OBSQTDisplay draws on the entire surface directly the client
decorations from QT are overwritten.

Instead promote OBSProjector to a simple QWidget with a single layout
containing the OBSQTDisplay. This allows the OBSQTDisplay to own the
entire contents while OBSProjector draws the decorations.

fixes obsproject#6283
kkartaltepe added a commit to kkartaltepe/obs-studio that referenced this issue Apr 20, 2022
Previously OBSProjector was a subclass of OBSQTDisplay, which is
intended to own the entire surface it draws on. On wayland some
compositors expect the client to draw decorations (window titlebar), but
because OBSQTDisplay draws on the entire surface directly the client
decorations from QT are overwritten.

Instead promote OBSProjector to a simple QWidget with a single layout
containing the OBSQTDisplay. This allows the OBSQTDisplay to own the
entire contents while OBSProjector draws the decorations.

fixes obsproject#6283
kkartaltepe added a commit to kkartaltepe/obs-studio that referenced this issue Apr 21, 2022
Previously OBSProjector was a subclass of OBSQTDisplay, which is
intended to own the entire surface it draws on. On wayland some
compositors expect the client to draw decorations (window titlebar), but
because OBSQTDisplay draws on the entire surface directly the client
decorations from QT are overwritten.

Instead promote OBSProjector to a simple QWidget with a single layout
containing the OBSQTDisplay. This allows the OBSQTDisplay to own the
entire contents while OBSProjector draws the decorations.

fixes obsproject#6283
@kkartaltepe kkartaltepe added Linux Affects Linux Confirmed This bug report has been confirmed by project members labels May 14, 2022
@Davilink
Copy link

Davilink commented Sep 24, 2022

Can also happen when undocking docks even if we can't redock them back.

I have the same problem on Wayland. Undocking the Scene window, cannot be redock because i cannot drag them back. The only way to re-dock them was using the "Reset Docks" menu item under the "Docks" menu.

@LawrenceIRL
Copy link

Just adding that I also experience this with the projection window and docks - and can replicate this issue.

OBS v28.1.2
Fedora 36
GNOME 42.4 on Wayland

@yozachar
Copy link

yozachar commented May 6, 2023

Wayland on Gnome 43.5

Screencast.from.2023-05-06.20-24-32.webm

If the title is double clicked, window decoration shows up, otherwise not. Unable to merge into main window.

kkartaltepe added a commit to kkartaltepe/obs-studio that referenced this issue Jan 26, 2025
This window was previously a parent of OBSQTDisplay, however
OBSQTDisplay is supposed to be completely rendered by OBS. On linux this
causes issues like not having window decorations and weird rendering
artifacts during resize. For wayland systems that negotiate explicit
sync it also triggers protocol violations (crashes) due to QT and OBS
thinking they should be rendering this window.

Instead make the project a parent window owned by Qt that only contains
one widget, the OBSQTDisplay. This makes the window behave like the
main OBS window and preview.

fixes obsproject#6283
kkartaltepe added a commit to kkartaltepe/obs-studio that referenced this issue Jan 26, 2025
This window was previously a parent of OBSQTDisplay, however
OBSQTDisplay is supposed to be completely rendered by OBS. On linux this
causes issues like not having window decorations and weird rendering
artifacts during resize. For wayland systems that negotiate explicit
sync it also triggers protocol violations (crashes) due to QT and OBS
thinking they should be rendering this window.

Instead make the project a parent window owned by Qt that only contains
one widget, the OBSQTDisplay. This makes the window behave like the
main OBS window and preview.

fixes obsproject#6283

Co-authored-by: cg2121 <[email protected]>
kkartaltepe added a commit to kkartaltepe/obs-studio that referenced this issue Jan 26, 2025
This window was previously a parent of OBSQTDisplay, however
OBSQTDisplay is supposed to be completely rendered by OBS. On linux this
causes issues like not having window decorations and weird rendering
artifacts during resize. For wayland systems that negotiate explicit
sync it also triggers protocol violations (crashes) due to QT and OBS
thinking they should be rendering this window.

Instead make the project a parent window owned by Qt that only contains
one widget, the OBSQTDisplay. This makes the window behave like the
main OBS window and preview.

fixes obsproject#6283

Co-authored-by: cg2121 <[email protected]>
@kkartaltepe kkartaltepe linked a pull request Jan 26, 2025 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Confirmed This bug report has been confirmed by project members Linux Affects Linux
Projects
None yet
7 participants