Commit 19066ee2 authored by Andrew Chen's avatar Andrew Chen

[shell] panelview: prevent duplicate connections for PanelView::restore

This prevents screens from being connected to the slot multiple times.
parent 1623b9ef
......@@ -780,7 +780,6 @@ void PanelView::moveEvent(QMoveEvent *ev)
void PanelView::integrateScreen()
{
connect(m_screenToFollow.data(), &QScreen::geometryChanged, this, &PanelView::restore);
updateMask();
KWindowSystem::setOnAllDesktops(winId(), true);
KWindowSystem::setType(winId(), NET::Dock);
......@@ -819,11 +818,16 @@ void PanelView::setScreenToFollow(QScreen *screen)
// disconnect from old screen
disconnect(m_screenToFollow, &QScreen::virtualGeometryChanged,
this, &PanelView::updateStruts);
disconnect(m_screenToFollow, &QScreen::geometryChanged,
this, &PanelView::restore);
}
connect(screen, &QScreen::virtualGeometryChanged,
this, &PanelView::updateStruts,
Qt::UniqueConnection);
connect(screen, &QScreen::geometryChanged,
this, &PanelView::restore,
Qt::UniqueConnection);
/*connect(screen, &QObject::destroyed, this, [this]() {
if (PanelView::screen()) {
......
Markdown is supported
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