Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.8.2
-
None
Description
The OBS project currently tries to use a simple qt window with a single native (openGL/DX11) widget with content drawn by the program. This was broken in Linux platforms in general as the configuration left QT attempting to upload buffers for the native window so we attempted to move to one QT widget for a frame with another QT widget for the native content. See https://github.com/obsproject/obs-studio/issues/11022#issuecomment-2648634809 for more discussion.
This configuration is broken when you attempt to flip between showFullscreen() and showNormal() but only on the gnome-shell wayland compositor. Other compositors such as sway showed no issues.
I have reduced it to a minimal example to assist Qt developers to investigate and attached it. It can be built with `cmake -B build -S .; ninja -C build; ./build/qtbug` (ensure it is not built release or compiler may optimize away native window drawing).
You can then click the window to fullscreen and click again to switch back to windowed. On gnome going to fullscreen and then windowed will result in the window remaining fullscreen-ed but Qt will report the window as windowed. You can also then drag the window (alt+left mouse) to cause gnome-shell to resize it back down to expected windowed size.
It seems using an uninitialized native window (not initializing opengl etc) or adding layout margin cause Qt to correctly handle the fullscreen/window'ed transition.