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

QGuiApplication closes windows in response to session save request

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • None
    • 5.5.1
    • QPA: X11/XCB
    • None
    • e7bf0edfd49de9a4d8285fbe8d878f8fda910e6d

      In
      QGuiApplicationPrivate::commitData()
      the two lines
      if (session_manager->allowsInteraction() && !tryCloseAllWindows())
      session_manager->cancel();
      cause windows to be closed, which results in the application quitting if QGuiApplication::quitOnLastWindowClosed() is true, which is the default.
      That is NOT what the SaveYourself message of the X session management protocol is supposed to trigger in applications. See:
      http://www.x.org/releases/X11R7.6/doc/libSM/xsmp.html#protocol
      Currently, qxcbsessionmanager.cpp is the only call site of QPlatformSessionManager::appCommitData(), which calls QGuiApplication::commitData(), so QGuiApplication::commitData() should implement at least the XSMP spec correctly.

      This bug prevents some KDE applications from restoring correctly.

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

            ahartmetz Andreas Hartmetz
            ahartmetz Andreas Hartmetz
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes