Blame SOURCES/0027-Client-Avoid-processing-of-events-when-showing-windo.patch

165ad0
From b736b4488dcaa1a3c6b0c6059e5b85881f74c52b Mon Sep 17 00:00:00 2001
f8c1a9
From: David Edmundson <davidedmundson@kde.org>
f8c1a9
Date: Sun, 14 Nov 2021 13:54:19 +0000
165ad0
Subject: [PATCH 27/40] Client: Avoid processing of events when showing windows
f8c1a9
f8c1a9
The only time we want to dispatch events from the wayland socket is when
f8c1a9
the application is waiting for external events. Doing so at any other
f8c1a9
time will cause unpredictable behavior in client code.
f8c1a9
f8c1a9
This caused a crash downstream where we had outputs get altered whilst
f8c1a9
itterating through outputs, which shouldn't happen.
f8c1a9
f8c1a9
There is no benefit to flushing here, it won't make anything appear
f8c1a9
faster as we haven't attached the buffer yet.
f8c1a9
f8c1a9
Change-Id: Ie13eae4012dab96a93d8810f468d1343402b8c28
f8c1a9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
f8c1a9
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
f8c1a9
(cherry picked from commit 46ed85a80b28d519cf5887bbdce55d1bf57886c3)
f8c1a9
---
f8c1a9
 src/client/qwaylandwindow.cpp | 1 -
f8c1a9
 1 file changed, 1 deletion(-)
f8c1a9
f8c1a9
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
f8c1a9
index ba881cb3..1597f67e 100644
f8c1a9
--- a/src/client/qwaylandwindow.cpp
f8c1a9
+++ b/src/client/qwaylandwindow.cpp
f8c1a9
@@ -436,7 +436,6 @@ void QWaylandWindow::setVisible(bool visible)
f8c1a9
         if (window()->type() == Qt::Popup || window()->type() == Qt::ToolTip)
f8c1a9
             activePopups << this;
f8c1a9
         initWindow();
f8c1a9
-        mDisplay->flushRequests();
f8c1a9
 
f8c1a9
         setGeometry(windowGeometry());
f8c1a9
         // Don't flush the events here, or else the newly visible window may start drawing, but since
f8c1a9
-- 
165ad0
2.35.1
f8c1a9