diff --git a/effects/cube/cube.cpp b/effects/cube/cube.cpp index 46ba7d62d8..3e924511d3 100644 --- a/effects/cube/cube.cpp +++ b/effects/cube/cube.cpp @@ -228,8 +228,11 @@ void CubeEffect::reconfigure(ReconfigureFlags) effects->unregisterTouchBorder(e, m_sphereAction); effects->unregisterTouchBorder(e, m_cylinderAction); } - auto touchEdge = [] (const QList touchBorders, QAction *action) { + auto touchEdge = [&relevantBorders] (const QList touchBorders, QAction *action) { for (int i : touchBorders) { + if (!relevantBorders.contains(ElectricBorder(i))) { + continue; + } effects->registerTouchBorder(ElectricBorder(i), action); } }; diff --git a/effects/desktopgrid/desktopgrid.cpp b/effects/desktopgrid/desktopgrid.cpp index c47c0824aa..82c6d308e9 100644 --- a/effects/desktopgrid/desktopgrid.cpp +++ b/effects/desktopgrid/desktopgrid.cpp @@ -127,6 +127,9 @@ void DesktopGridEffect::reconfigure(ReconfigureFlags) } const auto touchBorders = DesktopGridConfig::touchBorderActivate(); for (int i : touchBorders) { + if (!relevantBorders.contains(ElectricBorder(i))) { + continue; + } effects->registerTouchBorder(ElectricBorder(i), m_activateAction); } } diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp index 7ec058263a..51182c47a2 100755 --- a/effects/presentwindows/presentwindows.cpp +++ b/effects/presentwindows/presentwindows.cpp @@ -166,8 +166,11 @@ void PresentWindowsEffect::reconfigure(ReconfigureFlags) effects->unregisterTouchBorder(e, m_exposeAllAction); effects->unregisterTouchBorder(e, m_exposeClassAction); } - auto touchEdge = [] (const QList touchBorders, QAction *action) { + auto touchEdge = [&relevantBorders] (const QList touchBorders, QAction *action) { for (int i : touchBorders) { + if (!relevantBorders.contains(ElectricBorder(i))) { + continue; + } effects->registerTouchBorder(ElectricBorder(i), action); } };