summaryrefslogtreecommitdiff
path: root/NxWidgets/nxwm/src/ctaskbar.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'NxWidgets/nxwm/src/ctaskbar.cxx')
-rw-r--r--NxWidgets/nxwm/src/ctaskbar.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/NxWidgets/nxwm/src/ctaskbar.cxx b/NxWidgets/nxwm/src/ctaskbar.cxx
index ec3d8460b..ab686f81c 100644
--- a/NxWidgets/nxwm/src/ctaskbar.cxx
+++ b/NxWidgets/nxwm/src/ctaskbar.cxx
@@ -609,7 +609,9 @@ bool CTaskbar::stopApplication(IApplication *app)
hideApplicationWindow(app);
- // Stop the application (whatever this means to the application)
+ // Stop the application (whatever this means to the application). We
+ // separate stopping from destroying to get the application a chance
+ // to put things in order before being destroyed.
app->stop();
@@ -631,6 +633,11 @@ bool CTaskbar::stopApplication(IApplication *app)
}
}
+ // destroy the application
+
+ CWindowControl *control = app->getWindowControl();
+ control->destroy(app);
+
// Re-draw the new top, non-minimized application
bool ret = redrawTopWindow();