Saving annotations when the window is focused

When an annotation is edited and the user clicks
the top right 'x' to close evince's main window
while the annotation window itseld still has the
focus, the changes on the annotation are
acknowledged and the user is prompted to save
them.