From 5600cb0fea41e487b63bc016f54eb775ab92633f Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 15 May 2014 14:40:03 +0200 Subject: [PATCH] dismiss on focus out if a View was clicked BUG:334810 --- src/plasmaquick/dialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plasmaquick/dialog.cpp b/src/plasmaquick/dialog.cpp index 3a68f1855..4d333ac24 100644 --- a/src/plasmaquick/dialog.cpp +++ b/src/plasmaquick/dialog.cpp @@ -22,6 +22,7 @@ #include "dialog.h" #include "../declarativeimports/core/framesvgitem.h" #include "dialogshadows_p.h" +#include "view.h" #include #include @@ -793,7 +794,7 @@ void Dialog::focusOutEvent(QFocusEvent *ev) const QWindow *focusWindow = QGuiApplication::focusWindow(); bool childHasFocus = (focusWindow && focusWindow->isActive() && isAncestorOf(focusWindow)); - if (!parentHasFocus && !childHasFocus) { + if (qobject_cast(focusWindow) || (!parentHasFocus && !childHasFocus)) { qDebug() << "DIALOG: hiding dialog."; setVisible(false); emit windowDeactivated();