diff options
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java index 600f6a1e..deeaa5ad 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/MainWindow.java @@ -258,9 +258,13 @@ public abstract class MainWindow { } } if (!open) { - Window window = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow(); - if (window instanceof UiFeedback) { - open = ((UiFeedback) window).wantConfirmQuit(); + Window[] windows = Window.getWindows(); + for (Window window : windows) { + if (window.isVisible() && window instanceof UiFeedback + && ((UiFeedback) window).wantConfirmQuit()) { + open = true; + break; + } } } if (!open |