From 88a51dbf977d94431bdb8a2caeff44b7b1658fa4 Mon Sep 17 00:00:00 2001 From: Matt Gajownik Date: Sun, 11 Sep 2022 10:58:58 +1000 Subject: [PATCH] UI: Don't mark all widgets in main window as native on macOS This significantly improves undocking behaviour on macOS for most docks. Previously, undocking would perform an undock rather than undock + drag. This does not fix the behaviour for browser docks as they are native. May also improve performance of the main window, regardless of dock state. See https://github.com/qt/qtbase/commit/3224c6d7d150164241c13ccf7d47377a39c0a6bb --- UI/obs-app.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp index e2900374b..834048b64 100644 --- a/UI/obs-app.cpp +++ b/UI/obs-app.cpp @@ -1536,6 +1536,10 @@ bool OBSApp::OBSInit() native->nativeResourceForIntegration("display")); #endif +#ifdef __APPLE__ + setAttribute(Qt::AA_DontCreateNativeWidgetSiblings); +#endif + if (!StartupOBS(locale.c_str(), GetProfilerNameStore())) return false;