Verified Commit 0742227e authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

shell: avoid crash after waking up from sleep

The panel was removed by a timer, which can cause null QScreen pointer.

BUG: 455328
FIXED-IN: 5.25.3

(cherry picked from ffadcb34)
parent 5fdf2cf1
Pipeline #196611 passed with stage
in 15 minutes and 43 seconds
......@@ -839,13 +839,16 @@ void PanelView::resizeEvent(QResizeEvent *ev)
{
updateEnabledBorders();
// don't setGeometry() to make really sure we aren't doing a resize loop
const QPoint pos = geometryByDistance(m_distance).topLeft();
setPosition(pos);
if (m_shellSurface) {
m_shellSurface->setPosition(pos);
if (m_screenToFollow) {
const QPoint pos = geometryByDistance(m_distance).topLeft();
setPosition(pos);
if (m_shellSurface) {
m_shellSurface->setPosition(pos);
}
m_strutsTimer.start(STRUTSTIMERDELAY);
Q_EMIT m_corona->availableScreenRegionChanged();
}
m_strutsTimer.start(STRUTSTIMERDELAY);
Q_EMIT m_corona->availableScreenRegionChanged();
PlasmaQuick::ContainmentView::resizeEvent(ev);
}
......
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