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();