From 3994faff50effd4a431845afcf41df7037684544 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 16 Jul 2020 16:18:56 +0300 Subject: [PATCH] Rename the aboutToBeUnbound() signal in SurfaceInterface Rename the aboutToBeUnbound() signal to aboutToBeDestroyed() in order to make the usage of the word "destroyed" consistent. --- src/wayland/keyboard_interface.cpp | 2 +- src/wayland/pointer_interface.cpp | 2 +- src/wayland/seat_interface.cpp | 2 +- src/wayland/surface_interface.cpp | 2 +- src/wayland/surface_interface.h | 10 ++++++++-- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/wayland/keyboard_interface.cpp b/src/wayland/keyboard_interface.cpp index c03362b2fa..337b14a730 100644 --- a/src/wayland/keyboard_interface.cpp +++ b/src/wayland/keyboard_interface.cpp @@ -130,7 +130,7 @@ void KeyboardInterface::setFocusedSurface(SurfaceInterface *surface, quint32 ser if (!d->focusedSurface) { return; } - d->destroyConnection = connect(d->focusedSurface, &SurfaceInterface::aboutToBeUnbound, this, + d->destroyConnection = connect(d->focusedSurface, &SurfaceInterface::aboutToBeDestroyed, this, [this] { Q_D(); if (d->resource) { diff --git a/src/wayland/pointer_interface.cpp b/src/wayland/pointer_interface.cpp index 38e09d86ed..4a6099a3a5 100644 --- a/src/wayland/pointer_interface.cpp +++ b/src/wayland/pointer_interface.cpp @@ -264,7 +264,7 @@ void PointerInterface::setFocusedSurface(SurfaceInterface *surface, quint32 seri return; } d->focusedSurface = surface; - d->destroyConnection = connect(d->focusedSurface, &SurfaceInterface::aboutToBeUnbound, this, + d->destroyConnection = connect(d->focusedSurface, &SurfaceInterface::aboutToBeDestroyed, this, [this] { Q_D(); d->sendLeave(d->focusedChildSurface.data(), d->global->display()->nextSerial()); diff --git a/src/wayland/seat_interface.cpp b/src/wayland/seat_interface.cpp index 8003c16c85..563042fdaa 100644 --- a/src/wayland/seat_interface.cpp +++ b/src/wayland/seat_interface.cpp @@ -1616,7 +1616,7 @@ void SeatInterface::setFocusedTextInputSurface(SurfaceInterface *surface) } d->textInput.focus.textInput = t; if (d->textInput.focus.surface) { - d->textInput.focus.destroyConnection = connect(surface, &SurfaceInterface::aboutToBeUnbound, this, + d->textInput.focus.destroyConnection = connect(surface, &SurfaceInterface::aboutToBeDestroyed, this, [this] { setFocusedTextInputSurface(nullptr); } diff --git a/src/wayland/surface_interface.cpp b/src/wayland/surface_interface.cpp index 50060d6e17..407372d6d5 100644 --- a/src/wayland/surface_interface.cpp +++ b/src/wayland/surface_interface.cpp @@ -284,7 +284,7 @@ void SurfaceInterfacePrivate::installIdleInhibitor(IdleInhibitorInterface *inhib void SurfaceInterfacePrivate::surface_destroy_resource(Resource *) { - emit q->aboutToBeUnbound(); + emit q->aboutToBeDestroyed(); delete q; } diff --git a/src/wayland/surface_interface.h b/src/wayland/surface_interface.h index 402b567216..e43016d7c5 100644 --- a/src/wayland/surface_interface.h +++ b/src/wayland/surface_interface.h @@ -368,9 +368,15 @@ public: Q_SIGNALS: /** - * This signal is emitted when the surface is about to be unbound. + * This signal is emitted when the underlying wl_surface resource is about to be freed. + * + * The unbound() signal is emitted either when the client that owns the surface has been + * destroyed or if the surface has been destroyed due to a destructor request. + * + * The SurfaceInterface object and the associated wl_surface resource are valid when this + * signal is emitted. */ - void aboutToBeUnbound(); + void aboutToBeDestroyed(); /** * This signal is emitted when the projection matrix from the surface-local coordinate space * to the buffer coordinate space has been changed.