From d5ca50deb348446a66f5f1bd276199ed7d3b883d Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 28 Oct 2020 18:01:13 +0000 Subject: [PATCH] Only connect to BufferInterface::aboutToBeDestroyed once It is allowed to call surface_attach multiple times with the same buffer. We want to only connect once. Found whilst debugging a freeze, going through the list of BufferInterface connections I had multiple to the same SurfaceInterface. CCBUG: 428361 --- src/wayland/surface_interface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland/surface_interface.cpp b/src/wayland/surface_interface.cpp index 6aba38a615..465b929eb6 100644 --- a/src/wayland/surface_interface.cpp +++ b/src/wayland/surface_interface.cpp @@ -325,8 +325,8 @@ void SurfaceInterfacePrivate::surface_attach(Resource *resource, struct ::wl_res current.buffer->unref(); current.buffer = nullptr; } - } - ); + }, + Qt::UniqueConnection); } void SurfaceInterfacePrivate::surface_damage(Resource *, int32_t x, int32_t y, int32_t width, int32_t height)