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

[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(, &QScreen::geometryChanged, this, &PanelView::restore);
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,
connect(screen, &QScreen::geometryChanged,
this, &PanelView::restore,
/*connect(screen, &QObject::destroyed, this, [this]() {
if (PanelView::screen()) {
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