diff options
| author | Błażej Szczygieł <mumei6102@gmail.com> | 2025-11-27 19:19:02 +0100 |
|---|---|---|
| committer | David Edmundson <davidedmundson@kde.org> | 2025-12-02 02:31:44 +0000 |
| commit | 44b6b62d8317924423f0fa698237f0097454329e (patch) | |
| tree | d5ac7410962197d4df671b84e023e3cd629a2eda | |
| parent | 710847b3a5715bedbc7f30abafe8d55c58eafc9f (diff) | |
wayland: Remove call to flushWindowSystemEvents
The flushWindowSystemEvents() call in flushRequests() was added
in commit 84f1360289a to preserve event order when we had mixed
synchronous and asynchronous expose events. That issue has been
resolved in Qt 6.10 when we were able to make all expose calls synchronous, rendering this unneeded.
Reverts 6ff771b86f7b961a5ff63f148cf69ecb3415dd95
Pick-to: 6.10
Fixes: QTBUG-139425
Fixes: QTBUG-141938
Change-Id: Idcf3dbc54dc9c3e37cdc586f9f872338e63f4f0d
Reviewed-by: David Edmundson <davidedmundson@kde.org>
5 files changed, 2 insertions, 128 deletions
diff --git a/src/plugins/platforms/wayland/CMakeLists.txt b/src/plugins/platforms/wayland/CMakeLists.txt index d9415f0a011..9a5db541a42 100644 --- a/src/plugins/platforms/wayland/CMakeLists.txt +++ b/src/plugins/platforms/wayland/CMakeLists.txt @@ -78,7 +78,6 @@ qt_internal_add_module(WaylandClient qwaylandviewport.cpp qwaylandviewport_p.h qwaylandwindow.cpp qwaylandwindow_p.h qwaylandwindowmanagerintegration.cpp qwaylandwindowmanagerintegration_p.h - qwaylandeventdispatcher.cpp qwaylandeventdispatcher_p.h shellintegration/qwaylandclientshellapi_p.h shellintegration/qwaylandshellintegration_p.h shellintegration/qwaylandshellintegration.cpp shellintegration/qwaylandshellintegrationfactory.cpp shellintegration/qwaylandshellintegrationfactory_p.h diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index 1fc5e5c30a0..f20b0c5a7dc 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -32,7 +32,6 @@ #include "qwaylandtextinputv3_p.h" #include "qwaylandinputcontext_p.h" #include "qwaylandinputmethodcontext_p.h" -#include "qwaylandeventdispatcher_p.h" #include "qwaylandwindowmanagerintegration_p.h" #include "qwaylandshellintegration_p.h" @@ -525,7 +524,6 @@ void QWaylandDisplay::reconnect() void QWaylandDisplay::flushRequests() { m_eventThread->readAndDispatchEvents(); - QWindowSystemInterface::flushWindowSystemEvents(QWaylandEventDispatcher::eventDispatcher->flags()); } // We have to wait until we have an eventDispatcher before creating the eventThread, diff --git a/src/plugins/platforms/wayland/qwaylandeventdispatcher.cpp b/src/plugins/platforms/wayland/qwaylandeventdispatcher.cpp deleted file mode 100644 index f5f14f29824..00000000000 --- a/src/plugins/platforms/wayland/qwaylandeventdispatcher.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (C) 2025 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only - -#include "qwaylandeventdispatcher_p.h" - -QT_BEGIN_NAMESPACE - -namespace QtWaylandClient { - -QWaylandEventDispatcher *QWaylandEventDispatcher::eventDispatcher = nullptr; - -QAbstractEventDispatcher *QWaylandEventDispatcher::createEventDispatcher() -{ -#if !defined(QT_NO_GLIB) && !defined(Q_OS_WIN) - if (qEnvironmentVariableIsEmpty("QT_NO_GLIB") && QEventDispatcherGlib::versionSupported()) - return new QWaylandGlibEventDispatcher(); -#endif - return new QWaylandUnixEventDispatcher(); -} - -QWaylandEventDispatcher::QWaylandEventDispatcher() -{ - Q_ASSERT(!eventDispatcher); - eventDispatcher = this; -} - -QWaylandEventDispatcher::~QWaylandEventDispatcher() -{ - Q_ASSERT(eventDispatcher == this); - eventDispatcher = nullptr; -} - -bool QWaylandUnixEventDispatcher::processEvents(QEventLoop::ProcessEventsFlags flags) -{ - m_flags = flags; - return QUnixEventDispatcherQPA::processEvents(flags); -} - -QEventLoop::ProcessEventsFlags QWaylandUnixEventDispatcher::flags() const -{ - return m_flags; -} - -#if !defined(QT_NO_GLIB) && !defined(Q_OS_WIN) - -QEventLoop::ProcessEventsFlags QWaylandGlibEventDispatcher::flags() const -{ - return m_flags; -} - -#endif - -} - -QT_END_NAMESPACE diff --git a/src/plugins/platforms/wayland/qwaylandeventdispatcher_p.h b/src/plugins/platforms/wayland/qwaylandeventdispatcher_p.h deleted file mode 100644 index a0426d44a21..00000000000 --- a/src/plugins/platforms/wayland/qwaylandeventdispatcher_p.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (C) 2025 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only - -#ifndef QWAYLANDEVENTDISPATCHER_P_H -#define QWAYLANDEVENTDISPATCHER_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include <QtGui/private/qunixeventdispatcher_qpa_p.h> -#if !defined(QT_NO_GLIB) && !defined(Q_OS_WIN) -#include <QtGui/private/qeventdispatcher_glib_p.h> -#endif - -QT_BEGIN_NAMESPACE - -namespace QtWaylandClient { - -class QWaylandEventDispatcher -{ -public: - static QAbstractEventDispatcher *createEventDispatcher(); - - static QWaylandEventDispatcher *eventDispatcher; - -public: - QWaylandEventDispatcher(); - virtual ~QWaylandEventDispatcher(); - - virtual QEventLoop::ProcessEventsFlags flags() const = 0; -}; - -class QWaylandUnixEventDispatcher : public QUnixEventDispatcherQPA, QWaylandEventDispatcher -{ - Q_OBJECT -public: - bool processEvents(QEventLoop::ProcessEventsFlags flags) override; - - QEventLoop::ProcessEventsFlags flags() const override; - -private: - QEventLoop::ProcessEventsFlags m_flags; -}; - -#if !defined(QT_NO_GLIB) && !defined(Q_OS_WIN) - -class QWaylandGlibEventDispatcher : public QPAEventDispatcherGlib, QWaylandEventDispatcher -{ - Q_OBJECT -public: - QEventLoop::ProcessEventsFlags flags() const override; -}; - -#endif - -} - -QT_END_NAMESPACE - -#endif diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index b16a97d4c77..28a0cca9e55 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp @@ -18,7 +18,6 @@ #include "qwaylandplatformservices_p.h" #include "qwaylandscreen_p.h" #include "qwaylandcursor_p.h" -#include "qwaylandeventdispatcher_p.h" #if defined(Q_OS_MACOS) # include <QtGui/private/qcoretextfontdatabase_p.h> @@ -26,6 +25,7 @@ #else # include <QtGui/private/qgenericunixfontdatabase_p.h> #endif +#include <QtGui/private/qgenericunixeventdispatcher_p.h> #include <QtGui/private/qgenericunixtheme_p.h> #include <QtGui/private/qguiapplication_p.h> @@ -182,7 +182,7 @@ QPlatformBackingStore *QWaylandIntegration::createPlatformBackingStore(QWindow * QAbstractEventDispatcher *QWaylandIntegration::createEventDispatcher() const { - return QWaylandEventDispatcher::createEventDispatcher(); + return createUnixEventDispatcher(); } QPlatformNativeInterface *QWaylandIntegration::createPlatformNativeInterface() |
