Truly independent web browser
UI/Qt: Don’t create a window’s native window while building it
sideshowbarker3c82c05105e9
diff --git a/UI/Qt/WindowToolbar.cpp b/UI/Qt/WindowToolbar.cppindex 659215733e3..be47be8280c 100644--- a/UI/Qt/WindowToolbar.cpp+++ b/UI/Qt/WindowToolbar.cpp@@ -700,6 +700,9 @@ public:void round_corners(){#if defined(AK_OS_MACOS)+ // Asking for the native view would create the window's native window, even while the window is still being built.+ if (!internalWinId())+ return;if (m_expanded)round_appkit_view_corners(*this, ChromeStyle::LOCATION_EDIT_CORNER_RADIUS, Qt::transparent);else@@ -708,6 +711,13 @@ public:}private:+ virtual bool event(QEvent* event) override+ {+ if (event->type() == QEvent::WinIdChange)+ round_corners();+ return QWidget::event(event);+ }+virtual void paintEvent(QPaintEvent*) override{QPainter painter(this);