diff --git a/src/platformsupport/fbconvenience/qfbwindow.cpp b/src/platformsupport/fbconvenience/qfbwindow.cpp index da7c881d94..d4a5a968ef 100644 --- a/src/platformsupport/fbconvenience/qfbwindow.cpp +++ b/src/platformsupport/fbconvenience/qfbwindow.cpp @@ -51,6 +51,8 @@ QFbWindow::QFbWindow(QWindow *window) { static QAtomicInt winIdGenerator(1); windowId = winIdGenerator.fetchAndAddRelaxed(1); + + platformScreen()->addWindow(window); } QFbWindow::~QFbWindow() diff --git a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp index 057839a96d..5ad34f9795 100644 --- a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp +++ b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp @@ -89,9 +89,7 @@ QPlatformBackingStore *QLinuxFbIntegration::createPlatformBackingStore(QWindow * QPlatformWindow *QLinuxFbIntegration::createPlatformWindow(QWindow *window) const { - QFbWindow *w = new QFbWindow(window); - m_primaryScreen->addWindow(w); - return w; + return new QFbWindow(window); } QAbstractEventDispatcher *QLinuxFbIntegration::guiThreadEventDispatcher() const