diff --git a/src/wayland/xdgshell_interface.cpp b/src/wayland/xdgshell_interface.cpp index ed95ed7157..13d40865db 100644 --- a/src/wayland/xdgshell_interface.cpp +++ b/src/wayland/xdgshell_interface.cpp @@ -182,6 +182,7 @@ XdgSurfaceInterfacePrivate *XdgSurfaceInterfacePrivate::get(XdgSurfaceInterface void XdgSurfaceInterfacePrivate::xdg_surface_destroy_resource(Resource *resource) { Q_UNUSED(resource) + Q_EMIT q->aboutToBeDestroyed(); XdgShellInterfacePrivate::get(shell)->unregisterXdgSurface(q); delete q; } @@ -374,6 +375,7 @@ void XdgToplevelInterfacePrivate::reset() void XdgToplevelInterfacePrivate::xdg_toplevel_destroy_resource(Resource *resource) { Q_UNUSED(resource) + Q_EMIT q->aboutToBeDestroyed(); delete q; } @@ -695,6 +697,7 @@ void XdgPopupInterfacePrivate::reset() void XdgPopupInterfacePrivate::xdg_popup_destroy_resource(Resource *resource) { Q_UNUSED(resource) + Q_EMIT q->aboutToBeDestroyed(); delete q; } diff --git a/src/wayland/xdgshell_interface.h b/src/wayland/xdgshell_interface.h index 3d7bdc7e62..fcd3154a5f 100644 --- a/src/wayland/xdgshell_interface.h +++ b/src/wayland/xdgshell_interface.h @@ -162,6 +162,11 @@ public: static XdgSurfaceInterface *get(::wl_resource *resource); Q_SIGNALS: + /** + * This signal is emitted when the xdg-surface is about to be destroyed. + */ + void aboutToBeDestroyed(); + /** * This signal is emitted when a configure event with serial \a serial has been acknowledged. */ @@ -280,6 +285,11 @@ public: static XdgToplevelInterface *get(::wl_resource *resource); Q_SIGNALS: + /** + * This signal is emitted when the xdg-toplevel is about to be destroyed. + */ + void aboutToBeDestroyed(); + /** * This signal is emitted when the xdg-toplevel has commited the initial state and wants to * be configured. After initializing the toplevel, you must send a configure event. @@ -537,6 +547,11 @@ public: static XdgPopupInterface *get(::wl_resource *resource); Q_SIGNALS: + /** + * This signal is emitted when the xdg-popup is about to be destroyed. + */ + void aboutToBeDestroyed(); + /** * This signal is emitted when the xdg-popup has commited the initial state and wants to * be configured. After initializing the popup, you must send a configure event.