From 97f119af14d3cc1be24400a5e542d26fca96d36b Mon Sep 17 00:00:00 2001 From: Louai Al-Khanji Date: Thu, 18 Sep 2014 14:36:16 +0300 Subject: EGLFS: Add support for multiple displays Change-Id: Id039e0ed2d99562eb2a5cfe1e7b34013c75ff3ac Reviewed-by: Laszlo Agocs --- src/plugins/platforms/eglfs/qeglfsintegration.cpp | 24 ++++++++--------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'src/plugins/platforms/eglfs/qeglfsintegration.cpp') diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/qeglfsintegration.cpp index 16a113691f..ffae64d31c 100644 --- a/src/plugins/platforms/eglfs/qeglfsintegration.cpp +++ b/src/plugins/platforms/eglfs/qeglfsintegration.cpp @@ -77,6 +77,11 @@ bool QEglFSIntegration::hasCapability(QPlatformIntegration::Capability cap) cons return QEGLPlatformIntegration::hasCapability(cap); } +void QEglFSIntegration::addScreen(QPlatformScreen *screen) +{ + screenAdded(screen); +} + void QEglFSIntegration::initialize() { QEglFSHooks::hooks()->platformInit(); @@ -85,10 +90,13 @@ void QEglFSIntegration::initialize() if (!mDisableInputHandlers) createInputHandlers(); + + QEglFSHooks::hooks()->screenInit(); } void QEglFSIntegration::destroy() { + QEglFSHooks::hooks()->screenDestroy(); QEGLPlatformIntegration::destroy(); QEglFSHooks::hooks()->platformDestroy(); } @@ -98,11 +106,6 @@ EGLNativeDisplayType QEglFSIntegration::nativeDisplay() const return QEglFSHooks::hooks()->platformDisplay(); } -QEGLPlatformScreen *QEglFSIntegration::createScreen() const -{ - return new QEglFSScreen(display()); -} - QEGLPlatformWindow *QEglFSIntegration::createWindow(QWindow *window) const { return new QEglFSWindow(window); @@ -138,17 +141,6 @@ QPlatformOffscreenSurface *QEglFSIntegration::createOffscreenSurface(EGLDisplay // Never return null. Multiple QWindows are not supported by this plugin. } -QVariant QEglFSIntegration::styleHint(QPlatformIntegration::StyleHint hint) const -{ - switch (hint) - { - case QPlatformIntegration::ShowIsFullScreen: - return screen()->compositingWindow() == 0; - default: - return QPlatformIntegration::styleHint(hint); - } -} - EGLConfig QEglFSIntegration::chooseConfig(EGLDisplay display, const QSurfaceFormat &format) { class Chooser : public QEglConfigChooser { -- cgit v1.2.3