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

QCoreApplication::processEvents() doesn't Flush Wayland Messages

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.14.2
    • Wayland Compositor
    • None
    • Linux/X11

      The initial problem is reported here: https://bugreports.qt.io/browse/AUTOSUITE-709
      Basically this report is to clarify, whether QCoreApplication::processEvents should flush Wayland messages. This would be achieved with:

      diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp
      index e021b742..63002616 100644
      --- a/src/compositor/compositor_api/qwaylandcompositor.cpp
      +++ b/src/compositor/compositor_api/qwaylandcompositor.cpp
      @@ -218,6 +218,7 @@ void QWaylandCompositorPrivate::init()
       
       QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::eventDispatcher;
       QObject::connect(dispatcher, SIGNAL(aboutToBlock()), q, SLOT(processWaylandEvents()));
      + QObject::connect(dispatcher, SIGNAL(awake()), q, SLOT(processWaylandEvents()));
       
       initializeHardwareIntegration();
       initializeSeats(); 

      An admittedly contrived example is attached. The question is whether the client should terminate immediately when the compositor sends the window close event. The (glibc) implementation of the event dispatcher processEvents() method only emits awake and not aboutToBlock.

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

            qt.team.graphics.and.multimedia Qt Graphics Team
            bweimer Bernd Weimer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes