diff options
Diffstat (limited to 'src/gui/kernel/qplatformintegration_qpa.cpp')
-rw-r--r-- | src/gui/kernel/qplatformintegration_qpa.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/kernel/qplatformintegration_qpa.cpp b/src/gui/kernel/qplatformintegration_qpa.cpp index b35af1e8b7..23ecf3add4 100644 --- a/src/gui/kernel/qplatformintegration_qpa.cpp +++ b/src/gui/kernel/qplatformintegration_qpa.cpp @@ -46,6 +46,7 @@ #include <QtGui/QPlatformAccessibility> #include <QtGui/private/qguiapplication_p.h> #include <QtGui/private/qpixmap_raster_p.h> +#include <QtGui/private/qplatformscreen_qpa_p.h> #include <private/qdnd_p.h> QT_BEGIN_NAMESPACE @@ -255,11 +256,10 @@ QVariant QPlatformIntegration::styleHint(StyleHint hint) const */ void QPlatformIntegration::screenAdded(QPlatformScreen *ps) { - QScreen *screen = ps ? ps->screen() : 0; - if (screen && !QGuiApplicationPrivate::screen_list.contains(screen)) { - QGuiApplicationPrivate::screen_list << screen; - emit qGuiApp->screenAdded(screen); - } + QScreen *screen = new QScreen(ps); + ps->d_func()->screen = screen; + QGuiApplicationPrivate::screen_list << screen; + emit qGuiApp->screenAdded(screen); } class QPlatformTheme *QPlatformIntegration::platformTheme() const |