diff options
Diffstat (limited to 'user/knewstuff/backport.patch')
-rw-r--r-- | user/knewstuff/backport.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/user/knewstuff/backport.patch b/user/knewstuff/backport.patch new file mode 100644 index 000000000..002d4c182 --- /dev/null +++ b/user/knewstuff/backport.patch @@ -0,0 +1,54 @@ +From b634b65dd081746ccb8bdfa9bf2d878d13e2c0fb Mon Sep 17 00:00:00 2001 +From: Alexander Lohnau <alexander.lohnau@gmx.de> +Date: Tue, 24 May 2022 12:58:54 +0200 +Subject: [PATCH] Fix QtQuickDialogWrapper dialog not being usable in konsole + +Patch provided by David Edmundson. + +``` +Issue is QGuiApplicationPrivate::showModalWindow + +it marks every other non-modal window as blocked, including new windows. + +when we focus the new dialog at a wayland/X level Qt gets it, but in it's own internal dispatching ignores that and sends it to the modal window + +Qt is smart enough to handle child windows appropriately, but only if it knows about them. Having a transient parent should take care of this. We should have this anyway as that will fix some window placement bugs. +``` + +BUG: 452593 +--- + src/qtquickdialogwrapper.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/qtquickdialogwrapper.cpp b/src/qtquickdialogwrapper.cpp +index 4f22b650..e31e8d80 100644 +--- a/src/qtquickdialogwrapper.cpp ++++ b/src/qtquickdialogwrapper.cpp +@@ -7,10 +7,12 @@ + #include "qtquickdialogwrapper.h" + + #include <QEventLoop> ++#include <QGuiApplication> + #include <QQmlComponent> + #include <QQmlContext> + #include <QQmlEngine> + #include <QTimer> ++#include <QWindow> + + #include <KLocalizedContext> + +@@ -70,6 +72,11 @@ QtQuickDialogWrapper::QtQuickDialogWrapper(const QString &configFile, QObject *p + + // Forward relevant signals + connect(d->item, SIGNAL(closed()), this, SIGNAL(closed())); ++ ++ // Otherwise, the dialog is not in front of other popups, BUG: 452593 ++ auto window = qobject_cast<QWindow *>(d->item); ++ Q_ASSERT(window); ++ window->setTransientParent(QGuiApplication::focusWindow()); + } + } + +-- +GitLab + |