Changeset View
Changeset View
Standalone View
Standalone View
effects/presentwindows/presentwindows.cpp
Show First 20 Lines • Show All 160 Lines • ▼ Show 20 Line(s) | 119 | { | |||
---|---|---|---|---|---|
161 | 161 | | |||
162 | // touch screen edges | 162 | // touch screen edges | ||
163 | const QVector<ElectricBorder> relevantBorders{ElectricLeft, ElectricTop, ElectricRight, ElectricBottom}; | 163 | const QVector<ElectricBorder> relevantBorders{ElectricLeft, ElectricTop, ElectricRight, ElectricBottom}; | ||
164 | for (auto e : relevantBorders) { | 164 | for (auto e : relevantBorders) { | ||
165 | effects->unregisterTouchBorder(e, m_exposeAction); | 165 | effects->unregisterTouchBorder(e, m_exposeAction); | ||
166 | effects->unregisterTouchBorder(e, m_exposeAllAction); | 166 | effects->unregisterTouchBorder(e, m_exposeAllAction); | ||
167 | effects->unregisterTouchBorder(e, m_exposeClassAction); | 167 | effects->unregisterTouchBorder(e, m_exposeClassAction); | ||
168 | } | 168 | } | ||
169 | auto touchEdge = [] (const QList<int> touchBorders, QAction *action) { | 169 | auto touchEdge = [&relevantBorders] (const QList<int> touchBorders, QAction *action) { | ||
170 | for (int i : touchBorders) { | 170 | for (int i : touchBorders) { | ||
171 | if (!relevantBorders.contains(ElectricBorder(i))) { | ||||
172 | continue; | ||||
173 | } | ||||
171 | effects->registerTouchBorder(ElectricBorder(i), action); | 174 | effects->registerTouchBorder(ElectricBorder(i), action); | ||
172 | } | 175 | } | ||
173 | }; | 176 | }; | ||
174 | touchEdge(PresentWindowsConfig::touchBorderActivate(), m_exposeAction); | 177 | touchEdge(PresentWindowsConfig::touchBorderActivate(), m_exposeAction); | ||
175 | touchEdge(PresentWindowsConfig::touchBorderActivateAll(), m_exposeAllAction); | 178 | touchEdge(PresentWindowsConfig::touchBorderActivateAll(), m_exposeAllAction); | ||
176 | touchEdge(PresentWindowsConfig::touchBorderActivateClass(), m_exposeClassAction); | 179 | touchEdge(PresentWindowsConfig::touchBorderActivateClass(), m_exposeClassAction); | ||
177 | } | 180 | } | ||
178 | 181 | | |||
▲ Show 20 Lines • Show All 1870 Lines • Show Last 20 Lines |