Notify about messages when out of focus
This commit is contained in:
parent
1d706c14f2
commit
d030a866dd
@ -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