Blame SOURCES/0026-Fix-build.patch

6f97c1
From a8ddf1a7296e2d28b36231a391807226a7329ae4 Mon Sep 17 00:00:00 2001
6f97c1
From: David Edmundson <davidedmundson@kde.org>
6f97c1
Date: Mon, 14 Jun 2021 12:45:37 +0100
9fb289
Subject: [PATCH 26/52] Fix build
6f97c1
6f97c1
1b5e43a593e917610e6245f7a272ac081c508ba4 relied on a patch that we can't
6f97c1
backport.
6f97c1
6f97c1
This adds that extra internal boolean backporting just the tiny part of
6f97c1
d6ac8cf6.
6f97c1
---
6f97c1
 src/client/global/qwaylandclientextension.cpp | 5 ++++-
6f97c1
 src/client/global/qwaylandclientextension_p.h | 1 +
6f97c1
 2 files changed, 5 insertions(+), 1 deletion(-)
6f97c1
6f97c1
diff --git a/src/client/global/qwaylandclientextension.cpp b/src/client/global/qwaylandclientextension.cpp
6f97c1
index 797b06fe..edccfe63 100644
6f97c1
--- a/src/client/global/qwaylandclientextension.cpp
6f97c1
+++ b/src/client/global/qwaylandclientextension.cpp
6f97c1
@@ -74,7 +74,10 @@ void QWaylandClientExtensionPrivate::handleRegistryGlobal(void *data, ::wl_regis
6f97c1
 void QWaylandClientExtension::addRegistryListener()
6f97c1
 {
6f97c1
     Q_D(QWaylandClientExtension);
6f97c1
-    d->waylandIntegration->display()->addRegistryListener(&QWaylandClientExtensionPrivate::handleRegistryGlobal, this);
6f97c1
+    if (!d->registered) {
6f97c1
+        d->waylandIntegration->display()->addRegistryListener(&QWaylandClientExtensionPrivate::handleRegistryGlobal, this);
6f97c1
+        d->registered = true;
6f97c1
+    }
6f97c1
 }
6f97c1
 
6f97c1
 QWaylandClientExtension::QWaylandClientExtension(const int ver)
6f97c1
diff --git a/src/client/global/qwaylandclientextension_p.h b/src/client/global/qwaylandclientextension_p.h
6f97c1
index 69cc46a0..9091efbe 100644
6f97c1
--- a/src/client/global/qwaylandclientextension_p.h
6f97c1
+++ b/src/client/global/qwaylandclientextension_p.h
6f97c1
@@ -68,6 +68,7 @@ public:
6f97c1
     QtWaylandClient::QWaylandIntegration *waylandIntegration = nullptr;
6f97c1
     int version = -1;
6f97c1
     bool active = false;
6f97c1
+    bool registered = false;
6f97c1
 };
6f97c1
 
6f97c1
 class Q_WAYLAND_CLIENT_EXPORT QWaylandClientExtensionTemplatePrivate : public QWaylandClientExtensionPrivate
6f97c1
-- 
9fb289
2.35.1
6f97c1