// If the window is being closed, we need to update the
// state of the checkbox menu item, but we must do this
// in the AWT Event Thread.
// modified for fixing issue #174 hud visibility management
HUDEventType hudEventType = event.getEventType();
if (hudEventType == HUDEventType.MINIMIZED
|| hudEventType == HUDEventType.MAXIMIZED
|| hudEventType == HUDEventType.CLOSED) {
final boolean isSelected = hudEventType == HUDEventType.MAXIMIZED;
SwingUtilities.invokeLater(new Runnable() {