commit 01a1369bfb3bfaf7e0e1d74c640ce47bff92537a
Author: Koji Yokota <[email protected]>
Date:   Wed Nov 5 19:30:47 2025 +0900

    Workaround Qt6 bug on macOS Tahoe
    
    [QTBUG-141689]
        https://bugreports.qt.io/browse/QTBUG-141689
---
 src/frontends/qt/GuiAlert.cpp | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/frontends/qt/GuiAlert.cpp b/src/frontends/qt/GuiAlert.cpp
index 30f55eb220..90f4738da1 100644
--- a/src/frontends/qt/GuiAlert.cpp
+++ b/src/frontends/qt/GuiAlert.cpp
@@ -35,6 +35,10 @@
 #include <QPushButton>
 #include <QSettings>
 
+#ifdef Q_OS_MACOS
+#include <QOperatingSystemVersion>
+#endif
+
 #include <iomanip>
 #include <iostream>
 
@@ -113,8 +117,14 @@ 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);
+#ifdef Q_OS_MACOS
+       // temporary workaround of the issue:
+       //     https://bugreports.qt.io/browse/QTBUG-141689
+       if (QOperatingSystemVersion::current() <
+               QOperatingSystemVersion(QOperatingSystemVersion::MacOS, 26))
+               msg_box.setWindowModality(Qt::WindowModal);
+       else
+               msg_box.setWindowModality(Qt::ApplicationModal);
 #endif
        b[0] = msg_box.addButton(b1.empty() ? "OK" : toqstr(b1),
                                        QMessageBox::ActionRole);
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to