diff --git a/shell/panelview.h b/shell/panelview.h --- a/shell/panelview.h +++ b/shell/panelview.h @@ -209,6 +209,7 @@ int m_contentLength; int m_distance; int m_thickness; + bool m_initCompleted; Qt::Alignment m_alignment; QPointer m_panelConfigView; ShellCorona *m_corona; diff --git a/shell/panelview.cpp b/shell/panelview.cpp --- a/shell/panelview.cpp +++ b/shell/panelview.cpp @@ -62,7 +62,8 @@ m_corona(corona), m_visibilityMode(NormalPanel), m_background(0), - m_shellSurface(nullptr) + m_shellSurface(nullptr), + m_initCompleted(false) { if (targetScreen) { setPosition(targetScreen->geometry().center()); @@ -356,6 +357,10 @@ return; } + if (!m_initCompleted) { + return; + } + KWindowEffects::SlideFromLocation slideLocation = KWindowEffects::NoEdge; switch (containment()->location()) { @@ -461,6 +466,10 @@ void PanelView::resizePanel() { + if (!m_initCompleted) { + return; + } + QSize targetSize; QSize targetMinSize; QSize targetMaxSize; @@ -520,6 +529,7 @@ m_minLength = qBound(MINSIZE, config().readEntry("minLength", side), maxSize); setVisibilityMode((VisibilityMode)config().readEntry("panelVisibility", (int)NormalPanel)); + m_initCompleted = true; resizePanel(); positionPanel();