diff --git a/plasma/applets/launcher/launcher.cpp b/plasma/applets/launcher/launcher.cpp index f8328fd1..e185e00b 100644 --- a/plasma/applets/launcher/launcher.cpp +++ b/plasma/applets/launcher/launcher.cpp @@ -1536,6 +1536,9 @@ public: void resetSearch(); void setAllowedRunners(const QStringList &runners); +protected: + void focusInEvent(QFocusEvent *event) final; + public Q_SLOTS: void slotUpdateLayout(); @@ -1681,6 +1684,14 @@ void LauncherAppletWidget::setAllowedRunners(const QStringList &runners) m_searchwidget->setAllowedRunners(runners); } +void LauncherAppletWidget::focusInEvent(QFocusEvent *event) +{ + QGraphicsWidget::focusInEvent(event); + if (!m_lineedit->hasFocus()) { + m_lineedit->setFocus(event->reason()); + } +} + void LauncherAppletWidget::slotUpdateLayout() { slotUserTimeout();