Close dialog if button was clicked not just pressed

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Merge pull request #1313 from csware/close-button

Close dialog if button was clicked not just pressed