Fix 1368881: hide the input devices dialog when the close button is pushed