The standard way to notify a POSIX application to close, while still having a grace period to do cleanup is to send it the
SIGTERM (wikipedia link) signal. The
SIGKILL (wikipedia link) signal, on the other hand, kills the application without even giving it a chance to tidy up.
However… both of your actions - calling
top (by the way I would recommend that you switch to use
htop instead of
killall - send the
SIGTERM signal by default.
And I have just tested firing Firefox up - and trying it both with
SIGTERM, when I took Firefox again, I did not get any error or "restoration" message. With
SIGKILL, I got the
it's embarrassing screen.
So, the reason is simple: The instance of X for these apps is frozen. All these GUI applications operate under the premise that their instance of X is functioning properly. They probably cannot even try anything if X is frozen.
The way to solve your problem is to determine why X is freezing, and prevent that from happening.
Edit: Ah, sorry - just saw that you talk about using the Ubuntu alpha/beta when X freezes. In which case… I would say it is part of the excitement of running an alpha/beta. Try to understand why it freezes, write/add to a bug report. In order to speed Firefox's startup in these, simply tell it to not reload the same tabs when it reopens. (You can still find these tabs in history). For the other applications, their cleanup actions are rather trivial - it should not cost you much that they didn't happen.