UI: Don't create native widget siblings

Native windows really only make sense for previews. They can be a new
xcb_window or a wayland subsurface.

For historical reasons setting a widget to native will also affect
ancestors. Qt will still draw them as part of the parent as they are
never mapped, but a window is nonetheless created.

This is especially problematic on wayland as then the subsurface is
parented to an unmapped window.

This default behaviour can be turned off. Now only the native widgets
(the video previews) are actually native.
This commit is contained in:
David Edmundson 2020-09-16 15:24:22 +01:00 committed by Jim
parent 892bd62bfe
commit 4a32d1cec5

View File

@ -1379,6 +1379,7 @@ bool OBSApp::OBSInit()
ProfileScope("OBSApp::OBSInit");
setAttribute(Qt::AA_UseHighDpiPixmaps);
setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
qRegisterMetaType<VoidFunc>();