wayfire icon indicating copy to clipboard operation
wayfire copied to clipboard

Possible damage issue with some Qt apps such as OBS Studio

Open kode54 opened this issue 1 year ago • 9 comments

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 avatar May 23 '24 22:05 kode54

Uploaded log and video.

kode54 avatar May 24 '24 03:05 kode54

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

https://github.com/WayfireWM/wayfire/blob/5b4f9b94c7c7889e443b12b5f9bda51b3124fecd/src/view/wlr-surface-node.cpp#L301

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.

marcusbritanicus avatar May 24 '24 08:05 marcusbritanicus

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?

kode54 avatar May 24 '24 08:05 kode54

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.

marcusbritanicus avatar May 24 '24 08:05 marcusbritanicus

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

kode54 avatar May 24 '24 09:05 kode54

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

marcusbritanicus avatar May 27 '24 05:05 marcusbritanicus

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

ammen99 avatar Jun 11 '24 15:06 ammen99

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 avatar Jun 12 '24 04:06 kode54

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

kode54 avatar Jun 13 '24 07:06 kode54

followed the steps to reproduce the behavior:

https://github.com/user-attachments/assets/29f76f41-e485-40ea-a8f0-7ecbb857409e

killown avatar Jul 04 '25 15:07 killown

@kode54 are you still able to reproduce the bug? Seems that it is working on killown's setup at least. Maybe the bug was fixed as part of some other changes.

ammen99 avatar Jul 06 '25 20:07 ammen99

Yeah, this seems like a ~~dead~~ solved issue now. Closing.

kode54 avatar Jul 07 '25 07:07 kode54