Verified Commit 7761926a authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

shell: disconnect old `accentColorChanged` signal when primary screen is changed

Otherwise there will be many redundant signal bindings.
parent c6b01d7f
Pipeline #182637 passed with stage
in 9 minutes and 37 seconds
......@@ -785,7 +785,8 @@ void ShellCorona::primaryScreenChanged(QScreen *oldPrimary, QScreen *newPrimary)
// CHECK_SCREEN_INVARIANTS
// refresh the accent color signal binding
connect(m_desktopViewForScreen[m_screenPool->primaryScreen()], &DesktopView::accentColorChanged, this, &ShellCorona::colorChanged);
disconnect(m_desktopViewForScreen.value(oldPrimary), &DesktopView::accentColorChanged, this, &ShellCorona::colorChanged);
connect(m_desktopViewForScreen.value(newPrimary), &DesktopView::accentColorChanged, this, &ShellCorona::colorChanged);
}
#ifndef NDEBUG
......
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