Blame SOURCES/0026-Fix-build.patch

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