[konsole] [Bug 452593] The get new button in konsole shows behind the whole app and can't be interacted with searching does nothing

David Edmundson bugzilla_noreply at kde.org
Sun May 22 20:33:22 BST 2022


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

--- Comment #7 from David Edmundson <kde at 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 the assignee for the bug.


More information about the konsole-devel mailing list