Correctly cleanup everything when a application window is closed

Signed-off-by: Simon Busch <morphis@gravedo.de>
Don't close application main window when it was configured as boot time app

Signed-off-by: Simon Busch <morphis@gravedo.de>