Commit 277ad28b 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.

(cherry picked from commit 7761926a)
parent 05df0bbe
Pipeline #182784 passed with stage
in 6 minutes and 11 seconds
......@@ -785,7 +785,8 @@ void ShellCorona::primaryScreenChanged(QScreen *oldPrimary, QScreen *newPrimary)
// 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