BugFix repeated toggle clear workspace

This commit is contained in:
Bruno Herbelin
2022-02-22 22:43:58 +01:00
parent 7e81ef37d7
commit 559a186cd9

View File

@@ -1938,6 +1938,13 @@ WorkspaceWindow::WorkspaceWindow(const char* name): name_(name), impl_(nullptr)
void WorkspaceWindow::toggleClearRestoreWorkspace() void WorkspaceWindow::toggleClearRestoreWorkspace()
{ {
// repeated call should ensure all animations are done
for(auto it = windows_.cbegin(); it != windows_.cend(); ++it) {
if ( (*it)->impl_ && (*it)->impl_->animation )
return;
}
// toggle
if (clear_workspace_enabled) if (clear_workspace_enabled)
restoreWorkspace(); restoreWorkspace();
else else