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

Closing a full screen window via Qt APIs leaves the screen black on macOS

    XMLWordPrintable

Details

    • macOS
    • 7ba75d088c3eba81a1d2bb708119442991d9f30b (qt/qtbase/dev) ec45bf05aa9884f8c7bdd64c0adaa55f408b826b (qt/qtbase/6.2)

    Description

      The code snippet attached can be used to reproduce the issue

      #include <QApplication>
      #include <QWidget>
      #include <QTimer>
      
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          a.setQuitOnLastWindowClosed(false);
          QWidget w;
          w.showFullScreen();
          
          QTimer::singleShot(2000, [&]{
              w.close();
          });
          
          return a.exec();
      }
      

      Steps to reproduce:
      1. Build and run the example attached.
      Expected result:
      The window is closed and the dashboard changes to the "main" one

      Actual result:
      The window is closed and the dashboard is shown black, doesn't return to the "main" dashboard. (use cmd+tab to switch the dashboard).

      Attachments

        Issue Links

          Activity

            People

              vhilshei Volker Hilsheimer
              qtcomsupport Qt Support
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              Votes:
              21 Vote for this issue
              Watchers:
              36 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: