Notify about messages when out of focus
This commit is contained in:
parent
2ed30c56cd
commit
07fbe3438a
@ -60,7 +60,8 @@ public class StatusTrayIcon {
|
||||
trayIcon.setPopupMenu(popup);
|
||||
|
||||
// Only display messages if the stage is not focused
|
||||
stage.focusedProperty().addListener((ov, onHidden, onShown) -> displayMessages = ov.getValue());
|
||||
stage.focusedProperty().addListener((ov, onHidden, onShown) -> displayMessages = ov.getValue() == Boolean.FALSE);
|
||||
|
||||
|
||||
// Show the window if the user clicks on the icon
|
||||
trayIcon.addActionListener(evt -> Platform.runLater(() -> { stage.setIconified(false); stage.toFront(); stage.requestFocus(); }));
|
||||
|
Reference in New Issue
Block a user