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

Qt5: QPA triggers nested event processing on app startup

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.0.0 Beta 2
    • 5.0.0
    • GUI: Window management
    • None
    • Linux desktop, X11
    • c4e736cf9d0ff9cecfa03c1e6386957c7de706da

    Description

      In Qt5, creating a QApplication instance triggers event processing already, much before calling QApplication::exec().

      This comes from QGuiApplicationPrivate::init() calling QWindowSystemInterface::sendWindowSystemEvents(), which calls
      sendPostedEvent().

      As a result, a DBus call to this application can get processed already, even if nothing is ready for it yet...

      Simon Hausmann wrote:
      The specific case of ef2efafcc6b28791df6258fa1c5d565090a9577a comes from the
      MeeGo plugin that uses dbus properties to determine the screen orientation and sends a screen orientation change event on startup. Processing this window system even here helps to ensure that the initial screen orientation is correct.

      It sounds like sendPostedEvents() without any parameters is indeed a little
      bit too aggressive. Laszlo, Paul, any thoughts?

      Unless perhaps QApplicationPrivate::init should call
      QWindowSystemInterface::flushWindowSystemEvents instead?

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            dfaure David Faure (Private)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes