From c2b9c0ec89b3b4cfe1ace96bd8a54bdf765c85ad Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Sat, 7 Jul 2012 02:46:24 +0530 Subject: [PATCH] linuxfb: let the window register itself with the screen This moves the addWindow call to the platformsupport code. Change-Id: Icf9175ae86ad880248036362e9c5f40124744272 Reviewed-by: Gunnar Sletta Reviewed-by: Thomas Senyk Reviewed-by: Girish Ramakrishnan --- src/platformsupport/fbconvenience/qfbwindow.cpp | 2 ++ src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/platformsupport/fbconvenience/qfbwindow.cpp b/src/platformsupport/fbconvenience/qfbwindow.cpp index da7c881..d4a5a96 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 057839a..5ad34f9 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 -- 2.7.4