From 000d49463b7ad0252cfab4298be9bef4393e4ecb Mon Sep 17 00:00:00 2001 From: Eike Hein Date: Wed, 30 Apr 2014 15:03:32 +0200 Subject: [PATCH] Don't hide when focus moves to a child window. REVIEW:117897 --- src/plasmaquick/dialog.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plasmaquick/dialog.cpp b/src/plasmaquick/dialog.cpp index 58de55ba0..e621b1169 100644 --- a/src/plasmaquick/dialog.cpp +++ b/src/plasmaquick/dialog.cpp @@ -777,7 +777,9 @@ void Dialog::focusInEvent(QFocusEvent *ev) void Dialog::focusOutEvent(QFocusEvent *ev) { - if (d->hideOnWindowDeactivate) { + const QWindow *focusWindow = QGuiApplication::focusWindow(); + + if (d->hideOnWindowDeactivate && !(focusWindow && focusWindow->isActive() && isAncestorOf(focusWindow))) { qDebug() << "DIALOG: hiding dialog."; setVisible(false); }