Fix [Linux]/[Linuxfb] screen initialization.

For the linuxfb platform the screen was registered
before its geometry was calculated resulting that
the qpa controller will deal with a screen instance
that has geometry of QRect(0,0,1,1) .
This masks pretty much all the painting and the input.
The fix is to call screen init before registering
the screen instance to the qpa controller.

Change-Id: If84daca6587dc368301b578cdbf7b2a65a56a5b5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
Daniel Giurcanu 2013-12-17 12:30:02 +01:00 committed by The Qt Project
parent c8d696eee7
commit 1e44ff671e
2 changed files with 4 additions and 2 deletions

View File

@ -57,7 +57,6 @@ QLinuxFbIntegration::QLinuxFbIntegration(const QStringList &paramList)
: m_fontDb(new QGenericUnixFontDatabase()) : m_fontDb(new QGenericUnixFontDatabase())
{ {
m_primaryScreen = new QLinuxFbScreen(paramList); m_primaryScreen = new QLinuxFbScreen(paramList);
screenAdded(m_primaryScreen);
} }
QLinuxFbIntegration::~QLinuxFbIntegration() QLinuxFbIntegration::~QLinuxFbIntegration()
@ -67,7 +66,9 @@ QLinuxFbIntegration::~QLinuxFbIntegration()
void QLinuxFbIntegration::initialize() void QLinuxFbIntegration::initialize()
{ {
if (!m_primaryScreen->initialize()) if (m_primaryScreen->initialize())
screenAdded(m_primaryScreen);
else
qWarning("linuxfb: Failed to initialize screen"); qWarning("linuxfb: Failed to initialize screen");
} }

View File

@ -70,6 +70,7 @@ public:
private: private:
QLinuxFbScreen *m_primaryScreen; QLinuxFbScreen *m_primaryScreen;
QPlatformFontDatabase *m_fontDb; QPlatformFontDatabase *m_fontDb;
}; };
QT_END_NAMESPACE QT_END_NAMESPACE