this commit:

made modal like winodw.
add application exit with main window closed.