|
@@ -106,6 +106,13 @@ public class MasterkeyFileLoadingStrategy implements KeyLoadingStrategy {
|
|
|
Platform.runLater(() -> {
|
|
|
window.setScene(selectMasterkeyFileScene.get());
|
|
|
window.show();
|
|
|
+ Window owner = window.getOwner();
|
|
|
+ if (owner != null) {
|
|
|
+ window.setX(owner.getX() + (owner.getWidth() - window.getWidth()) / 2);
|
|
|
+ window.setY(owner.getY() + (owner.getHeight() - window.getHeight()) / 2);
|
|
|
+ } else {
|
|
|
+ window.centerOnScreen();
|
|
|
+ }
|
|
|
});
|
|
|
return masterkeyFileProvisionLock.awaitInteraction();
|
|
|
}
|
|
@@ -126,6 +133,13 @@ public class MasterkeyFileLoadingStrategy implements KeyLoadingStrategy {
|
|
|
Platform.runLater(() -> {
|
|
|
window.setScene(passphraseEntryScene.get());
|
|
|
window.show();
|
|
|
+ Window owner = window.getOwner();
|
|
|
+ if (owner != null) {
|
|
|
+ window.setX(owner.getX() + (owner.getWidth() - window.getWidth()) / 2);
|
|
|
+ window.setY(owner.getY() + (owner.getHeight() - window.getHeight()) / 2);
|
|
|
+ } else {
|
|
|
+ window.centerOnScreen();
|
|
|
+ }
|
|
|
if (wrongPassword) {
|
|
|
Animations.createShakeWindowAnimation(window).play();
|
|
|
}
|