From a195a6b0b3971f864b1b95ca93ac034bae9fa736 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Tue, 15 Nov 2016 10:30:43 +0100 Subject: [PATCH] [AppletInterface] Never pull focus away from fullRepresentation When closing the launcher using Meta key, it pulls focus away and when clicking the button to expand the applet, it won't get focus again. BUG: 372476 REVIEW: 129404 --- src/scriptengines/qml/plasmoid/appletinterface.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scriptengines/qml/plasmoid/appletinterface.cpp b/src/scriptengines/qml/plasmoid/appletinterface.cpp index f24bc5152..a3f966765 100644 --- a/src/scriptengines/qml/plasmoid/appletinterface.cpp +++ b/src/scriptengines/qml/plasmoid/appletinterface.cpp @@ -150,8 +150,11 @@ void AppletInterface::init() bool activate = !( isExpanded() && isActivationTogglesExpanded() ); setExpanded(activate); - if (QQuickItem *i = qobject_cast(fullRepresentationItem())) { - i->setFocus(activate, Qt::ShortcutFocusReason); + if (activate) { + if (QQuickItem *i = qobject_cast(fullRepresentationItem())) { + // Bug 372476: never pull focus away from it, only setFocus(true) + i->setFocus(true, Qt::ShortcutFocusReason); + } } });