Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. Running two applications with EGLFS
QtWS25 Last Chance

Running two applications with EGLFS

Scheduled Pinned Locked Moved Unsolved QtonPi
1 Posts 1 Posters 707 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • vikramgV Offline
    vikramgV Offline
    vikramg
    wrote on last edited by
    #1

    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:

    1. The first app starts fine
    2. If I launch the second app, that starts fine also.
    3. 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.
    4. 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?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved