From 7bb250826e3b298cb22a41d5779f7eed98846797 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 2 Apr 2024 11:44:54 +0300 Subject: [PATCH] wayland: Emit closed signal immediately after marking the window as closed The main motivation is to give users a chance to perform their cleanup. --- src/xdgshellwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xdgshellwindow.cpp b/src/xdgshellwindow.cpp index ef92707ffc..e56d9a4885 100644 --- a/src/xdgshellwindow.cpp +++ b/src/xdgshellwindow.cpp @@ -295,6 +295,8 @@ void XdgSurfaceWindow::destroyWindow() { handleRoleDestroyed(); markAsDeleted(); + Q_EMIT closed(); + stopDelayedInteractiveMoveResize(); if (isInteractiveMoveResize()) { leaveInteractiveMoveResize(); @@ -305,7 +307,6 @@ void XdgSurfaceWindow::destroyWindow() qDeleteAll(m_configureEvents); m_configureEvents.clear(); cleanTabBox(); - Q_EMIT closed(); StackingUpdatesBlocker blocker(workspace()); workspace()->rulebook()->discardUsed(this, true); cleanGrouping();