Listner close and Behavior F5-button.

Hi,
I do a treatment before leaving the application, so I added the Listner


mainWindow.addListener(new Window.CloseListener() {
                @Override
                public void windowClose(CloseEvent e) {
                      …
                     close();
                 }
});

How to avoid this behavior by pressing the F5?
thank you for your help,