diff --git a/shell/panelview.cpp b/shell/panelview.cpp index f3c3cd0ce..23107bb6d 100644 --- a/shell/panelview.cpp +++ b/shell/panelview.cpp @@ -78,11 +78,7 @@ PanelView::PanelView(ShellCorona *corona, QScreen *targetScreen, QWindow *parent m_positionPaneltimer.setSingleShot(true); m_positionPaneltimer.setInterval(150); - connect(&m_positionPaneltimer, &QTimer::timeout, - this, [this] () { - restore(); - positionPanel(); - }); + connect(&m_positionPaneltimer, &QTimer::timeout, this, &PanelView::restore); m_unhideTimer.setSingleShot(true); m_unhideTimer.setInterval(500); @@ -517,6 +513,10 @@ void PanelView::restore() emit minimumLengthChanged(); emit offsetChanged(); emit alignmentChanged(); + + //::restore might have been called directly before the timer fires + // at which point we don't still need the timer + m_positionPaneltimer.stop(); } void PanelView::showConfigurationInterface(Plasma::Applet *applet)