fixing use of desktop features on headless platform

This commit is contained in:
Sebastian Stenzel
2017-12-30 21:05:01 +01:00
parent 08cfcffa72
commit b8ee19b395
3 changed files with 17 additions and 8 deletions
@@ -128,9 +128,13 @@ public class MainController implements ViewController {
EasyBind.subscribe(areAllVaultsLocked, Platform::setImplicitExit);
autoUnlocker.unlockAllSilently();
Desktop.getDesktop().setPreferencesHandler(e -> {
Platform.runLater(this::toggleShowSettings);
});
try {
Desktop.getDesktop().setPreferencesHandler(e -> {
Platform.runLater(this::toggleShowSettings);
});
} catch (UnsupportedOperationException e) {
LOG.info("Unable to setPreferencesHandler, probably not supported on this OS.");
}
}
@FXML