diff --git a/src/dorkbox/notify/NotifyPopupWindowAdapter.java b/src/dorkbox/notify/NotifyPopupWindowAdapter.java index f56808f..1b94dc0 100644 --- a/src/dorkbox/notify/NotifyPopupWindowAdapter.java +++ b/src/dorkbox/notify/NotifyPopupWindowAdapter.java @@ -19,15 +19,24 @@ import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; class NotifyPopupWindowAdapter extends WindowAdapter { + public + void windowClosing(WindowEvent e) { + if (e.getNewState() != WindowEvent.WINDOW_CLOSED) { + NotifyPopup source = (NotifyPopup) e.getSource(); + source.close(); + } + } + public void windowLostFocus(WindowEvent e) { if (e.getNewState() != WindowEvent.WINDOW_CLOSED) { NotifyPopup source = (NotifyPopup) e.getSource(); + // these don't work //toFront(); //requestFocus(); + //requestFocusInWindow(); source.setAlwaysOnTop(false); source.setAlwaysOnTop(true); - //requestFocusInWindow(); } } }