Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-94766

[Possible bug] OpenGL contexts/viewers are recreated when switching workspaces on Gnome

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.14.2
    • Fix Version/s: None
    • Component/s: GUI: OpenGL
    • Labels:
      None
    • Environment:
      Ubuntu 20.10, Gnome 3.30 (default configurations)
      Qt 5.14.2 (from APT)
    • Platform/s:
      Linux/X11

      Description

      The behavior of QOpenGLWidget under Gnome is unexpected, and possibly a bug.

      When I have one or multiple QOpenGLWidgets rendering on a window in a QApplication and I switch to a different Gnome workspace (with Ctrl+Alt+<Up/Down arrow>), the application does not seem to care.
      However, when I switch back to the workspace where the application resides, the QOpenGLWidget::initializeGL function is called for all viewers, as if they were being destroyed and recreated. Is this expected behavior ?

      Here's a little more info about my particular setup :

      • Ubuntu 20.10
      • Gnome 3.30
      • Qt 5.14.2 (installed from APT)
      • No particular configuration of Gnome, all stock
      • Using libQGLViewer for rendering (which only inherits QOpenGLWidget and adds camera controls and a few utilities)

      This behavior happens when switching to different workspaces, not when enabling the 'Exposé-like' view by pressing on Super. The re-building of the widgets happens when switching back to the workspace the widgets are on, and there's a couple of frames of where the OpenGL widgets only render black when the re-building happens.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            lagocs Laszlo Agocs
            Reporter:
            thibaulltt Thibault de Villèle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes