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

showFullscreen->showNormal issues in gnome wayland

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.2
    • QPA: Wayland
    • None
    • Linux/Wayland

    Description

      The OBS project currently tries to use a simple qt window with a single native (openGL/DX11) widget with content drawn by the program. This was broken in Linux platforms in general as the configuration left QT attempting to upload buffers for the native window so we attempted to move to one QT widget for a frame with another QT widget for the native content. See https://github.com/obsproject/obs-studio/issues/11022#issuecomment-2648634809 for more discussion.

       

      This configuration is broken when you attempt to flip between showFullscreen() and showNormal() but only on the gnome-shell wayland compositor. Other compositors such as sway showed no issues.

       

      I have reduced it to a minimal example to assist Qt developers to investigate and attached it. It can be built with `cmake -B build -S .; ninja -C build; ./build/qtbug` (ensure it is not built release or compiler may optimize away native window drawing).

      You can then click the window to fullscreen and click again to  switch back to windowed. On gnome going to fullscreen and then windowed will result in the window remaining fullscreen-ed but Qt will report the window as windowed. You can also then drag the window (alt+left mouse) to cause gnome-shell to resize it back down to expected windowed size.

       

      It seems using an uninitialized native window (not initializing opengl etc) or adding layout margin cause Qt to correctly handle the fullscreen/window'ed transition.

       

      Attachments

        1. CMakeLists.txt
          0.8 kB
        2. main.cpp
          5 kB
        3. main-1.cpp
          5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            davidedmundson David Edmundson
            kurufu kurufu 2
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes