diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index b67582d9cb..a0d88362f9 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2530,8 +2530,10 @@ void QGuiApplicationPrivate::processWindowStateChangedEvent(QWindowSystemInterfa void QGuiApplicationPrivate::processWindowScreenChangedEvent(QWindowSystemInterfacePrivate::WindowScreenChangedEvent *wse) { if (QWindow *window = wse->window.data()) { +#ifndef Q_OS_MACOS if (window->screen() == wse->screen.data()) return; +#endif if (QWindow *topLevelWindow = window->d_func()->topLevelWindow(QWindow::ExcludeTransients)) { if (QScreen *screen = wse->screen.data()) topLevelWindow->d_func()->setTopLevelScreen(screen, false /* recreate */); diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index d697170814..37801db7b8 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -509,7 +509,10 @@ void QWindowPrivate::setTopLevelScreen(QScreen *newScreen, bool recreate) qWarning() << q << '(' << newScreen << "): Attempt to set a screen on a child window."; return; } - if (newScreen != topLevelScreen) { +#ifndef Q_OS_MACOS + if (newScreen != topLevelScreen) +#endif + { const bool shouldRecreate = recreate && windowRecreationRequired(newScreen); const bool shouldShow = visibilityOnDestroy && !topLevelScreen; if (shouldRecreate && platformWindow)