Blame SOURCES/0013-Fix-build.patch

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