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

XCB: QWindow doesn't restore fullscreen window state

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.2.0, 5.2.1
    • None
    • Debian 7 64bit
      KDE 4.11.3
      Gnome 3.8+

    Description

      When i minimize fullscreen QWindow and then restore it from task bar or dock it's going to be fullscreen again under Windows. Same steps doesn't restore Fullscreen window on linux. It looks like default minimum size framed window under linux.

      MainWindow is a QWindow derived class.
      void MainWindow::showExpanded()
      {
          showFullScreen();
      }
      
      // Custom minimize button calls that function.
      void MainWindow::minimize()
      {
          showMinimized();
      }
      
      
      //WORKAROUND under linux
      void MainWindow::onWindowStateChanged(Qt::WindowState state)
      {
          //INFO: Somehow Qt5 doesn't restore fullscreen state when we minimize the application.
          //WORKAROUND: restore minimize the fullscreen on linux.
      #if defined(Q_OS_LINUX)
          static bool isMinimized = false;
          static Qt::WindowState previousState = state;
          if (previousState == Qt::WindowNoState && state == Qt::WindowMinimized) {
              isMinimized = true;
          }
          else if (isMinimized && state == Qt::WindowNoState) {
              isMinimized = false;
              this->showFullScreen();
          }
          previousState = state;
      #endif
      }
      
      

      Attachments

        Issue Links

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

          Activity

            People

              paeglis Gatis Paeglis
              hanser Aaron Seng
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes