From bc9911f5a63216dc6fed44934399bcf0f7bc1187 Mon Sep 17 00:00:00 2001 From: Matt Gajownik Date: Tue, 30 Nov 2021 21:11:36 +1100 Subject: [PATCH] UI: Pass parent QWidget to Browser Docks --- UI/auth-restream.cpp | 6 +++--- UI/auth-twitch.cpp | 8 ++++---- UI/auth-youtube.cpp | 2 +- UI/window-extra-browsers.cpp | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/UI/auth-restream.cpp b/UI/auth-restream.cpp index e57304d0f..7147b302d 100644 --- a/UI/auth-restream.cpp +++ b/UI/auth-restream.cpp @@ -142,7 +142,7 @@ void RestreamAuth::LoadUI() chat->setWindowTitle(QTStr("Auth.Chat")); chat->setAllowedAreas(Qt::AllDockWidgetAreas); - browser = cef->create_widget(nullptr, url, panel_cookies); + browser = cef->create_widget(chat.get(), url, panel_cookies); chat->SetWidget(browser); main->addDockWidget(Qt::RightDockWidgetArea, chat.data()); @@ -159,7 +159,7 @@ void RestreamAuth::LoadUI() info->setWindowTitle(QTStr("Auth.StreamInfo")); info->setAllowedAreas(Qt::AllDockWidgetAreas); - browser = cef->create_widget(nullptr, url, panel_cookies); + browser = cef->create_widget(info.get(), url, panel_cookies); info->SetWidget(browser); main->addDockWidget(Qt::LeftDockWidgetArea, info.data()); @@ -176,7 +176,7 @@ void RestreamAuth::LoadUI() channels->setWindowTitle(QTStr("RestreamAuth.Channels")); channels->setAllowedAreas(Qt::AllDockWidgetAreas); - browser = cef->create_widget(nullptr, url, panel_cookies); + browser = cef->create_widget(channels.get(), url, panel_cookies); channels->SetWidget(browser); main->addDockWidget(Qt::LeftDockWidgetArea, channels.data()); diff --git a/UI/auth-twitch.cpp b/UI/auth-twitch.cpp index 13206ac83..2228a3b19 100644 --- a/UI/auth-twitch.cpp +++ b/UI/auth-twitch.cpp @@ -225,7 +225,7 @@ void TwitchAuth::LoadUI() chat->setWindowTitle(QTStr("Auth.Chat")); chat->setAllowedAreas(Qt::AllDockWidgetAreas); - browser = cef->create_widget(nullptr, url, panel_cookies); + browser = cef->create_widget(chat.get(), url, panel_cookies); chat->SetWidget(browser); cef->add_force_popup_url(moderation_tools_url, chat.data()); @@ -313,7 +313,7 @@ void TwitchAuth::LoadSecondaryUIPanes() info->setWindowTitle(QTStr("Auth.StreamInfo")); info->setAllowedAreas(Qt::AllDockWidgetAreas); - browser = cef->create_widget(nullptr, url, panel_cookies); + browser = cef->create_widget(info.get(), url, panel_cookies); info->SetWidget(browser); browser->setStartupScript(script); @@ -333,7 +333,7 @@ void TwitchAuth::LoadSecondaryUIPanes() stat->setWindowTitle(QTStr("TwitchAuth.Stats")); stat->setAllowedAreas(Qt::AllDockWidgetAreas); - browser = cef->create_widget(nullptr, url, panel_cookies); + browser = cef->create_widget(stat.get(), url, panel_cookies); stat->SetWidget(browser); browser->setStartupScript(script); @@ -353,7 +353,7 @@ void TwitchAuth::LoadSecondaryUIPanes() feed->setWindowTitle(QTStr("TwitchAuth.Feed")); feed->setAllowedAreas(Qt::AllDockWidgetAreas); - browser = cef->create_widget(nullptr, url, panel_cookies); + browser = cef->create_widget(feed.get(), url, panel_cookies); feed->SetWidget(browser); browser->setStartupScript(script); diff --git a/UI/auth-youtube.cpp b/UI/auth-youtube.cpp index ea1a34344..3616192ec 100644 --- a/UI/auth-youtube.cpp +++ b/UI/auth-youtube.cpp @@ -148,7 +148,7 @@ void YoutubeAuth::LoadUI() chat->setWindowTitle(QTStr("Auth.Chat")); chat->setAllowedAreas(Qt::AllDockWidgetAreas); - browser = cef->create_widget(nullptr, YOUTUBE_CHAT_PLACEHOLDER_URL, + browser = cef->create_widget(chat.get(), YOUTUBE_CHAT_PLACEHOLDER_URL, panel_cookies); browser->setStartupScript(ytchat_script); diff --git a/UI/window-extra-browsers.cpp b/UI/window-extra-browsers.cpp index 144bf631d..2cbdd48bb 100644 --- a/UI/window-extra-browsers.cpp +++ b/UI/window-extra-browsers.cpp @@ -530,7 +530,7 @@ void OBSBasic::AddExtraBrowserDock(const QString &title, const QString &url, dock->setAllowedAreas(Qt::AllDockWidgetAreas); QCefWidget *browser = - cef->create_widget(nullptr, QT_TO_UTF8(url), nullptr); + cef->create_widget(dock, QT_TO_UTF8(url), nullptr); if (browser && panel_version >= 1) browser->allowAllPopups(true);