Changeset View
Changeset View
Standalone View
Standalone View
effects/desktopgrid/desktopgrid.cpp
Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Line(s) | 100 | { | |||
---|---|---|---|---|---|
122 | 122 | | |||
123 | // deactivate and activate all touch border | 123 | // deactivate and activate all touch border | ||
124 | const QVector<ElectricBorder> relevantBorders{ElectricLeft, ElectricTop, ElectricRight, ElectricBottom}; | 124 | const QVector<ElectricBorder> relevantBorders{ElectricLeft, ElectricTop, ElectricRight, ElectricBottom}; | ||
125 | for (auto e : relevantBorders) { | 125 | for (auto e : relevantBorders) { | ||
126 | effects->unregisterTouchBorder(e, m_activateAction); | 126 | effects->unregisterTouchBorder(e, m_activateAction); | ||
127 | } | 127 | } | ||
128 | const auto touchBorders = DesktopGridConfig::touchBorderActivate(); | 128 | const auto touchBorders = DesktopGridConfig::touchBorderActivate(); | ||
129 | for (int i : touchBorders) { | 129 | for (int i : touchBorders) { | ||
130 | if (!relevantBorders.contains(ElectricBorder(i))) { | ||||
131 | continue; | ||||
132 | } | ||||
130 | effects->registerTouchBorder(ElectricBorder(i), m_activateAction); | 133 | effects->registerTouchBorder(ElectricBorder(i), m_activateAction); | ||
131 | } | 134 | } | ||
132 | } | 135 | } | ||
133 | 136 | | |||
134 | //----------------------------------------------------------------------------- | 137 | //----------------------------------------------------------------------------- | ||
135 | // Screen painting | 138 | // Screen painting | ||
136 | 139 | | |||
137 | void DesktopGridEffect::prePaintScreen(ScreenPrePaintData& data, int time) | 140 | void DesktopGridEffect::prePaintScreen(ScreenPrePaintData& data, int time) | ||
▲ Show 20 Lines • Show All 1321 Lines • Show Last 20 Lines |