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
This commit is contained in:
David Edmundson 2020-10-28 18:01:13 +00:00
parent f6e98a34b2
commit d5ca50deb3

View file

@ -325,8 +325,8 @@ void SurfaceInterfacePrivate::surface_attach(Resource *resource, struct ::wl_res
current.buffer->unref(); current.buffer->unref();
current.buffer = nullptr; current.buffer = nullptr;
} }
} },
); Qt::UniqueConnection);
} }
void SurfaceInterfacePrivate::surface_damage(Resource *, int32_t x, int32_t y, int32_t width, int32_t height) void SurfaceInterfacePrivate::surface_damage(Resource *, int32_t x, int32_t y, int32_t width, int32_t height)