wayland: Emit closed signal immediately after marking the window as closed

The main motivation is to give users a chance to perform their cleanup.
This commit is contained in:
Vlad Zahorodnii 2024-04-02 11:44:54 +03:00
parent 28d6b5230a
commit 7bb250826e

View file

@ -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();