summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/api
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2017-01-12 13:54:05 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-01-18 14:48:35 +0000
commita0bc9d0027e5e46d66b7d9b62b04d8c3cac9c82f (patch)
tree3b53de2428067a1896b84ec3c8806b6bde46ad9b /src/plugins/platforms/eglfs/api
parent8c144298439a6537adc0d67ca03382a305484deb (diff)
DRM/KMS config: add support for specifying the primary screen
Not having a way to say that a given output should be registered as the primary screen (meaning it comes first in the QGuiApplication::screens() list, emits primaryScreenChanged() signal etc.) can be a problem for some systems. The order of the outputs array in the JSON configuration file is not relevant in this respect since screens are registered either in the original DRM connector order, or, when the virtual desktop layout is specified via virtualIndex, in the order specified by virtualIndex. The primary screen status is independent from this. Therefore, add a new, optional boolean property: primary. For example, the following forces the QScreen corresponding to the VGA output to be the primary screen on the Renesas R-Car H2 board, even though by default it is the HDMI one that happens to be reported first by the system. { "device": "/dev/dri/card0", "outputs": [ { "name": "HDMI1", "mode": "1280x720" }, { "name": "VGA1", "mode": "1280x720", "primary": true }, { "name": "LVDS1", "mode": "off" } ] } In addition, improve the quality of the logging output. [ChangeLog][Platform Specific Changes] Added support for specifying the primary screen in the JSON config file in QT_QPA_EGLFS_KMS_CONFIG when running on DRM/KMS with eglfs. Task-number: QTBUG-57980 Change-Id: Iba490800dee3b7162c68c4d40b0822f3f6d81b69 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/plugins/platforms/eglfs/api')
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfsintegration.cpp4
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfsintegration_p.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
index 0aa7a65276..73110dba61 100644
--- a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
+++ b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
@@ -116,9 +116,9 @@ QEglFSIntegration::QEglFSIntegration()
initResources();
}
-void QEglFSIntegration::addScreen(QPlatformScreen *screen)
+void QEglFSIntegration::addScreen(QPlatformScreen *screen, bool isPrimary)
{
- screenAdded(screen);
+ screenAdded(screen, isPrimary);
}
void QEglFSIntegration::removeScreen(QPlatformScreen *screen)
diff --git a/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h b/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h
index 080c8ed332..c288876678 100644
--- a/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h
+++ b/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h
@@ -103,7 +103,7 @@ public:
QFbVtHandler *vtHandler() { return m_vtHandler.data(); }
- void addScreen(QPlatformScreen *screen);
+ void addScreen(QPlatformScreen *screen, bool isPrimary = false);
void removeScreen(QPlatformScreen *screen);
private: