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

XCB: QWindow doesn't restore fullscreen window state

XMLWordPrintable

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

      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
      }
      
      

        For Gerrit Dashboard: QTBUG-36898
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes