https://bugs.kde.org/show_bug.cgi?id=452593

--- Comment #7 from David Edmundson <k...@davidedmundson.co.uk> ---
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.

Lazy fix:

diff --git a/src/qtquickdialogwrapper.cpp b/src/qtquickdialogwrapper.cpp

--- a/src/qtquickdialogwrapper.cpp
+++ b/src/qtquickdialogwrapper.cpp
@@ -11,6 +11,8 @@
+#include <QGuiApplication>
+#include <QWindow>

 #include <KLocalizedContext>

@@ -82,7 +84,13 @@ void QtQuickDialogWrapper::open()
 {
     if (d->item) {
         d->changedEntries.clear();
+
+        // unsafe Hack
+        auto win = qobject_cast<QWindow*>(d->item);
+        win->setTransientParent(QGuiApplication::focusWindow());;
+        // hack end
+
     }
 }

Should introduce a setTransientParent public API call? Or take the window in
the ctor? Relying on the current focus is a bit horrible.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to