Verified Commit 6a754b17 authored by Fushan Wen's avatar Fushan Wen
Browse files

shell: Remove m_positionPaneltimer to avoid the toolbar from getting lost.

The delay causes the toolbar being unable to follow the panel sometimes.

CCBUG: 435240
parent 9d08b997
Pipeline #154619 passed with stage
in 7 minutes and 11 seconds
......@@ -82,16 +82,12 @@ PanelView::PanelView(ShellCorona *corona, QScreen *targetScreen, QWindow *parent
// so we exactly know when rootobject is available
connect(this, &QuickViewSharedEngine::statusChanged, this, &PanelView::handleQmlStatusChange);
m_positionPaneltimer.setSingleShot(true);
m_positionPaneltimer.setInterval(150);
connect(&m_positionPaneltimer, &QTimer::timeout, this, &PanelView::restore);
m_unhideTimer.setSingleShot(true);
m_unhideTimer.setInterval(500ms);
connect(&m_unhideTimer, &QTimer::timeout, this, &PanelView::restoreAutoHide);
m_lastScreen = targetScreen;
connect(this, &PanelView::locationChanged, &m_positionPaneltimer, qOverload<>(&QTimer::start));
connect(this, &PanelView::locationChanged, this, &PanelView::restore);
connect(this, &PanelView::containmentChanged, this, &PanelView::refreshContainment);
if (!m_corona->kPackage().isValid()) {
......@@ -649,10 +645,6 @@ void PanelView::restore()
Q_EMIT minimumLengthChanged();
Q_EMIT offsetChanged();
Q_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)
......@@ -919,7 +911,7 @@ void PanelView::adaptToScreen()
integrateScreen();
showTemporarily();
m_positionPaneltimer.start();
restore();
}
bool PanelView::event(QEvent *e)
......
......@@ -253,7 +253,6 @@ private:
VisibilityMode m_visibilityMode;
OpacityMode m_opacityMode;
Plasma::Theme m_theme;
QTimer m_positionPaneltimer;
QTimer m_unhideTimer;
Plasma::Types::BackgroundHints m_backgroundHints;
Plasma::FrameSvg::EnabledBorders m_enabledBorders = Plasma::FrameSvg::AllBorders;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment