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

QGuiApplication closes windows in response to session save request

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.5.1
    • Fix Version/s: None
    • Component/s: QPA: X11/XCB
    • Labels:
      None
    • Commits:
      e7bf0edfd49de9a4d8285fbe8d878f8fda910e6d

      Description

      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.

        Attachments

          Issue Links

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

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ahartmetz Andreas Hartmetz
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes