summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/qeglfsintegration.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-09-15 17:06:39 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-09-22 14:15:40 +0000
commit863dfb1541f4f0865a6e4ee42dbef159eaa7f2d0 (patch)
tree5f30df1a9012b1c01c21029eeb20e1ecebb924b7 /src/plugins/platforms/eglfs/qeglfsintegration.cpp
parenteecc351c5d05989c1b0ea3349f76a579b83eb446 (diff)
eglfs: Create input handlers only when screens are available
Some code may rely on the primary screen geometry for example. Task-number: QTBUG-47002 Change-Id: I42fc1ccf0c1d91beb5d8e9691ac6ec4e7400e567 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfsintegration.cpp')
-rw-r--r--src/plugins/platforms/eglfs/qeglfsintegration.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/qeglfsintegration.cpp
index 5f2cc9abbc..f0946b9b64 100644
--- a/src/plugins/platforms/eglfs/qeglfsintegration.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsintegration.cpp
@@ -129,13 +129,14 @@ void QEglFSIntegration::initialize()
m_vtHandler.reset(new QFbVtHandler);
- if (!m_disableInputHandlers)
- createInputHandlers();
-
if (qt_egl_device_integration()->usesDefaultScreen())
addScreen(new QEglFSScreen(display()));
else
qt_egl_device_integration()->screenInit();
+
+ // Input code may rely on the screens, so do it only after the screen init.
+ if (!m_disableInputHandlers)
+ createInputHandlers();
}
void QEglFSIntegration::destroy()