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

Possible damage issue with some Qt apps such as OBS Studio #2366

Open
kode54 opened this issue May 23, 2024 · 9 comments
Open

Possible damage issue with some Qt apps such as OBS Studio #2366

kode54 opened this issue May 23, 2024 · 9 comments
Labels
Milestone

Comments

@kode54
Copy link
Contributor

kode54 commented May 23, 2024

Describe the bug
This is a slightly more general damage issue with Qt apps, but the most recent one in my memory is OBS Studio. It occurs at least with the Properties dialog for Screen Capture (PipeWire). It does not occur on labwc, and does not occur on Plasma or GNOME. The issue that occurs is that the opaque regions of the window are completely transparent to what's underneath the window, until something else damages them, and then the window objects fill in.

A similar issue occurred sometimes with Qt drop list menus, where the menu outline would paint, but only the selected menu option would paint, until the rest of them are moused over. It would then paint fully on successive openings.

Possibly a Qt bug, possibly Wayfire, possibly wlroots.

To Reproduce
Steps to reproduce the behavior:

  1. Mostly default configuration of Wayfire, on amdgpu.
  2. Open OBS Studio
  3. Add a Screen Capture (PipeWire) source to the scene
  4. Open its Properties dialog by right clicking on the entry in the scene list and selecting it at the bottom of the menu

Expected behavior
Background of the Properties dialog should be opaque, as should its controls.

Screenshots or stacktrace
WAYLAND_DEBUG log and screen recording of the holes in the dialog:
obs_wldebug.log.txt
obs_capture.mp4

obs_capture.x264.mp4

Wayfire version
0.8.1.r302.g5b4f9b94-1

@kode54 kode54 added the bug label May 23, 2024
@kode54
Copy link
Contributor Author

kode54 commented May 24, 2024

Uploaded log and video.

@marcusbritanicus
Copy link
Contributor

@kode54 Does this help your problem in anyway?

Also since you are already able to compile wayfire, you might want to try wayfire with this if block here removed:

if (self->surface)

I strongly suspect that will make the problem go away - otherwise let me know, it would indicate that there is a Wayfire bug in addition to the client bug.

If it fixes your problem then it's most likely a Qt theme issue.

PS: At the moment I cannot see a "Screen Capture (Pipewire)" option in obs at all for reasons I do not understand.

@kode54
Copy link
Contributor Author

kode54 commented May 24, 2024

Screen Capture Pipewire requires xdg-desktop-portal-wlr to be functioning, or -kde for Plasma desktop. Not sure what else it needs to pop into existence.

And I guess that theme issue means the default Breeze theme is broken?

@marcusbritanicus
Copy link
Contributor

Screen Capture Pipewire requires xdg-desktop-portal-wlr to be functioning, or -kde for Plasma desktop. Not sure what else it needs to pop into existence.

Well. I have all of that working and running. From the #wayfire channel:

Do I need to compile obs my myself to get it show the "Screen Record" option? Whatever I do, I cannot see that option at all
Audio seems to be fine
I can see the meters detect both input and output
I have both xdp and xdp-wlr running. XDG_CURRENT_DESKTOP=DesQ:Wayfire:wlroots is set
Am I missing something?

And I guess that theme issue means the default Breeze theme is broken?

That is always a possibility, and would not be the first time. It also depends on what the app itself is doing. If it's trying to apply some transparency effects, then it would be the app problem rather than the theme.

@kode54
Copy link
Contributor Author

kode54 commented May 24, 2024

I wouldn't expect OBS Studio to be applying transparency effects to a property sheet dialog box popup.

@marcusbritanicus
Copy link
Contributor

marcusbritanicus commented May 27, 2024

@kode54 Thanks for your help in getting obs working on my laptop. For now, it seems to work.

Try as I may, I am unable to reproduce the bug you face. I tried a few variations when testing:

  1. I tested the properties dialog with all the themes available in its settings.
  2. With the theme set to "System", I used two different widget styles: breeze and fusion.

In each case, I have opened the properties dialog 5 times via the menu, and 5 times with the button. In all the tests, I could not find any inconsistencies/artefacts.

My tests were performed on DesQ, rather than Wayfire vanilla. The main difference is that DesQ uses platform-theme DesQ, that defines a custom palette without any transparencies. This would have effect only in the second set of variations - OBS Theme: System.

Aux Info:
OS: Arch repos over Artix base
Qt: 6.7.0-6 from Artix/World repo.

PS: I know 6.7.1 is available, I'll test it and update this comment when done.

@ammen99
Copy link
Member

ammen99 commented Jun 11, 2024

@kode54 Please test with the patch discussed in the comments above, if that helps, then the bug is indeed in Qt.

Otherwise, please consider re-uploading the video, I cannot play in anymore in the browser.

@kode54
Copy link
Contributor Author

kode54 commented Jun 12, 2024

Commenting out that block of code did not fix the bug. The video is still live at the link in the top post. It requires a video player with HEVC support. I suppose I can upload a transcode to H.264 somewhere.

@kode54
Copy link
Contributor Author

kode54 commented Jun 13, 2024

I uploaded a h.264 transcode above, in the opening post.

@ammen99 ammen99 added this to the 0.10 milestone Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants