Unsolved Running two applications with EGLFS
vikramg last edited by
The documentation states that
EGLFS forces the first top-level window (be it either a QWidget or a QQuickView) to become fullscreen... with EGLFS there is always exactly one native window and EGL window surface, and these belong to the widget or window that is created first.
However, I would like to know if there is any way to force two applications to run with EGLFS, where the first one spawns the other, and when that second app is dismissed, the first returns to the foreground.
In my experimentation, I see the following:
- The first app starts fine
- If I launch the second app, that starts fine also.
- When second app is quit, the process exits but the UI stays on screen. Refreshing the UI of the first app via
QCoreApplication::processEvents()does not change anything.
- If the first app is terminated and rerun, it does overwrite the UI of the second one.
So it seems to me that there is something related to EGLFS in the initial launch of the app that serves to paint the UI in the framebuffer, that does not happen with a "UI refresh" command from within Qt.
I ran ltrace on the launch of the app and there are several calls from libQt5EglFSDeviceIntegration.so.5:
QEglFSIntegration::QEglFSIntegration() qt_egl_device_integration() QEglFSDeviceIntegrationFactory::keys(QString const&) QEglFSDeviceIntegrationFactory::create(QString const&, QString const&) QEglFSIntegration::nativeDisplay() QEglFSScreen::QEglFSScreen(void*) QEglFSCursor::QEglFSCursor(QPlatformScreen*) QEglFSIntegration::addScreen(QPlatformScreen*, bool) QEglFSIntegration::createInputHandlers() QEglFSWindow::QEglFSWindow(QWindow*) QEglFSWindow::create() QEglFSWindow::screen() QEglFSDeviceIntegration::chooseConfig(void*, QSurfaceFormat const&) QEglFSScreen::setPrimarySurface(void*) QEglFSWindow::isRaster() QEglFSContext::QEglFSContext(QSurfaceFormat const&, QPlatformOpenGLContext*, void*, void**, QVariant const&)
Is there a way to manually call some of these functions to force the first app to redraw its UI after the second one is quit?