summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/eglfs/api/qeglfsintegration.cpp')
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfsintegration.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
index 43f2e31a49..48469b0f8c 100644
--- a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
+++ b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
@@ -120,16 +120,6 @@ QEglFSIntegration::QEglFSIntegration()
initResources();
}
-void QEglFSIntegration::addScreen(QPlatformScreen *screen, bool isPrimary)
-{
- screenAdded(screen, isPrimary);
-}
-
-void QEglFSIntegration::removeScreen(QPlatformScreen *screen)
-{
- destroyScreen(screen);
-}
-
void QEglFSIntegration::initialize()
{
qt_egl_device_integration()->platformInit();
@@ -147,7 +137,7 @@ void QEglFSIntegration::initialize()
m_vtHandler.reset(new QFbVtHandler);
if (qt_egl_device_integration()->usesDefaultScreen())
- addScreen(new QEglFSScreen(display()));
+ QWindowSystemInterface::handleScreenAdded(new QEglFSScreen(display()));
else
qt_egl_device_integration()->screenInit();
@@ -198,6 +188,7 @@ QPlatformBackingStore *QEglFSIntegration::createPlatformBackingStore(QWindow *wi
static_cast<QEglFSWindow *>(window->handle())->setBackingStore(bs);
return bs;
#else
+ Q_UNUSED(window);
return nullptr;
#endif
}
@@ -428,6 +419,8 @@ QFunctionPointer QEglFSIntegration::platformFunction(const QByteArray &function)
#if QT_CONFIG(evdev)
if (function == QEglFSFunctions::loadKeymapTypeIdentifier())
return QFunctionPointer(loadKeymapStatic);
+ else if (function == QEglFSFunctions::switchLangTypeIdentifier())
+ return QFunctionPointer(switchLangStatic);
#endif
return qt_egl_device_integration()->platformFunction(function);
@@ -446,6 +439,17 @@ void QEglFSIntegration::loadKeymapStatic(const QString &filename)
#endif
}
+void QEglFSIntegration::switchLangStatic()
+{
+#if QT_CONFIG(evdev)
+ QEglFSIntegration *self = static_cast<QEglFSIntegration *>(QGuiApplicationPrivate::platformIntegration());
+ if (self->m_kbdMgr)
+ self->m_kbdMgr->switchLang();
+ else
+ qWarning("QEglFSIntegration: Cannot switch language, no keyboard handler found");
+#endif
+}
+
void QEglFSIntegration::createInputHandlers()
{
#if QT_CONFIG(libinput)