From c8e33acaf7a7c24497fe95762ec17ec7a8c1e2f2 Mon Sep 17 00:00:00 2001 From: Armin Schrenk Date: Wed, 11 Mar 2020 16:58:51 +0100 Subject: [PATCH] set owner of wrong file alert window --- .../cryptomator/ui/wrongfilealert/WrongFileAlertModule.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/ui/src/main/java/org/cryptomator/ui/wrongfilealert/WrongFileAlertModule.java b/main/ui/src/main/java/org/cryptomator/ui/wrongfilealert/WrongFileAlertModule.java index 0f64a802e..7c64a079d 100644 --- a/main/ui/src/main/java/org/cryptomator/ui/wrongfilealert/WrongFileAlertModule.java +++ b/main/ui/src/main/java/org/cryptomator/ui/wrongfilealert/WrongFileAlertModule.java @@ -14,6 +14,7 @@ import org.cryptomator.ui.common.FxController; import org.cryptomator.ui.common.FxControllerKey; import org.cryptomator.ui.common.FxmlFile; import org.cryptomator.ui.common.FxmlScene; +import org.cryptomator.ui.mainwindow.MainWindow; import javax.inject.Named; import javax.inject.Provider; @@ -34,10 +35,11 @@ abstract class WrongFileAlertModule { @Provides @WrongFileAlertWindow @WrongFileAlertScoped - static Stage provideStage(ResourceBundle resourceBundle, @Named("windowIcons") List windowIcons) { + static Stage provideStage(@MainWindow Stage mainWindow, ResourceBundle resourceBundle, @Named("windowIcons") List windowIcons) { Stage stage = new Stage(); stage.setTitle(resourceBundle.getString("wrongFileAlert.title")); stage.setResizable(false); + stage.initOwner(mainWindow); stage.initModality(Modality.WINDOW_MODAL); stage.getIcons().addAll(windowIcons); return stage;