Processing..... works for Stop button and "X" ...

close button.