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(); handleRoleDestroyed();
markAsDeleted(); markAsDeleted();
Q_EMIT closed();
stopDelayedInteractiveMoveResize(); stopDelayedInteractiveMoveResize();
if (isInteractiveMoveResize()) { if (isInteractiveMoveResize()) {
leaveInteractiveMoveResize(); leaveInteractiveMoveResize();
@ -305,7 +307,6 @@ void XdgSurfaceWindow::destroyWindow()
qDeleteAll(m_configureEvents); qDeleteAll(m_configureEvents);
m_configureEvents.clear(); m_configureEvents.clear();
cleanTabBox(); cleanTabBox();
Q_EMIT closed();
StackingUpdatesBlocker blocker(workspace()); StackingUpdatesBlocker blocker(workspace());
workspace()->rulebook()->discardUsed(this, true); workspace()->rulebook()->discardUsed(this, true);
cleanGrouping(); cleanGrouping();