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

QGuiApplication closes windows in response to session save request

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.5.1
    • QPA: X11/XCB
    • None
    • 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

              ahartmetz Andreas Hartmetz
              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