[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
This commit is contained in:
Kai Uwe Broulik 2016-11-15 10:30:43 +01:00
parent 53d516a688
commit a195a6b0b3

View File

@ -150,8 +150,11 @@ void AppletInterface::init()
bool activate = !( isExpanded() && isActivationTogglesExpanded() );
setExpanded(activate);
if (QQuickItem *i = qobject_cast<QQuickItem *>(fullRepresentationItem())) {
i->setFocus(activate, Qt::ShortcutFocusReason);
if (activate) {
if (QQuickItem *i = qobject_cast<QQuickItem *>(fullRepresentationItem())) {
// Bug 372476: never pull focus away from it, only setFocus(true)
i->setFocus(true, Qt::ShortcutFocusReason);
}
}
});