]> git.lyx.org Git - features.git/commitdiff
#12001 make message boxes modal on Mac
authorStephan Witt <switt@lyx.org>
Wed, 2 Aug 2023 15:59:46 +0000 (17:59 +0200)
committerStephan Witt <switt@lyx.org>
Wed, 2 Aug 2023 16:00:02 +0000 (18:00 +0200)
src/frontends/qt/GuiAlert.cpp

index 288289c05d296b71b159d2a8b44a8244f772a396..30f55eb22060c530b918dc940c2b4b01b17e5948 100644 (file)
@@ -113,6 +113,9 @@ buttonid doPrompt(docstring const & title, docstring const & question,
        QMessageBox msg_box(QMessageBox::Information,
                        toqstr(title), toqstr(question),
                        QMessageBox::NoButton, qApp->focusWidget());
+#ifdef Q_OS_MAC
+       msg_box.setWindowModality(Qt::WindowModal);
+#endif
        b[0] = msg_box.addButton(b1.empty() ? "OK" : toqstr(b1),
                                        QMessageBox::ActionRole);
        if (!b2.empty())