[LyX/master] #12001 make message boxes modal on Mac
Stephan Witt
switt at lyx.org
Wed Aug 2 14:45:37 UTC 2023
commit 550c79215b16d89a7f849145520741ba3400f58b
Author: Stephan Witt <switt at lyx.org>
Date: Wed Aug 2 17:59:46 2023 +0200
#12001 make message boxes modal on Mac
---
src/frontends/qt/GuiAlert.cpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/frontends/qt/GuiAlert.cpp b/src/frontends/qt/GuiAlert.cpp
index 288289c..30f55eb 100644
--- a/src/frontends/qt/GuiAlert.cpp
+++ b/src/frontends/qt/GuiAlert.cpp
@@ -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())
More information about the lyx-cvs
mailing list