[effects] Don't register touch edges which don't exist
Summary: Apparently some old configs made PresentWindows register the top left corner which does not make any sense as that's not supported by touch. So to be sure, don't register those edges. BUG: 383797 FIXED-IN: 5.11 Test Plan: Not tested, I'm on Wayland Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D7508
This commit is contained in:
parent
80c3fdd684
commit
981662a6b5
3 changed files with 11 additions and 2 deletions
|
@ -228,8 +228,11 @@ void CubeEffect::reconfigure(ReconfigureFlags)
|
||||||
effects->unregisterTouchBorder(e, m_sphereAction);
|
effects->unregisterTouchBorder(e, m_sphereAction);
|
||||||
effects->unregisterTouchBorder(e, m_cylinderAction);
|
effects->unregisterTouchBorder(e, m_cylinderAction);
|
||||||
}
|
}
|
||||||
auto touchEdge = [] (const QList<int> touchBorders, QAction *action) {
|
auto touchEdge = [&relevantBorders] (const QList<int> touchBorders, QAction *action) {
|
||||||
for (int i : touchBorders) {
|
for (int i : touchBorders) {
|
||||||
|
if (!relevantBorders.contains(ElectricBorder(i))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
effects->registerTouchBorder(ElectricBorder(i), action);
|
effects->registerTouchBorder(ElectricBorder(i), action);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -127,6 +127,9 @@ void DesktopGridEffect::reconfigure(ReconfigureFlags)
|
||||||
}
|
}
|
||||||
const auto touchBorders = DesktopGridConfig::touchBorderActivate();
|
const auto touchBorders = DesktopGridConfig::touchBorderActivate();
|
||||||
for (int i : touchBorders) {
|
for (int i : touchBorders) {
|
||||||
|
if (!relevantBorders.contains(ElectricBorder(i))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
effects->registerTouchBorder(ElectricBorder(i), m_activateAction);
|
effects->registerTouchBorder(ElectricBorder(i), m_activateAction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,8 +166,11 @@ void PresentWindowsEffect::reconfigure(ReconfigureFlags)
|
||||||
effects->unregisterTouchBorder(e, m_exposeAllAction);
|
effects->unregisterTouchBorder(e, m_exposeAllAction);
|
||||||
effects->unregisterTouchBorder(e, m_exposeClassAction);
|
effects->unregisterTouchBorder(e, m_exposeClassAction);
|
||||||
}
|
}
|
||||||
auto touchEdge = [] (const QList<int> touchBorders, QAction *action) {
|
auto touchEdge = [&relevantBorders] (const QList<int> touchBorders, QAction *action) {
|
||||||
for (int i : touchBorders) {
|
for (int i : touchBorders) {
|
||||||
|
if (!relevantBorders.contains(ElectricBorder(i))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
effects->registerTouchBorder(ElectricBorder(i), action);
|
effects->registerTouchBorder(ElectricBorder(i), action);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue