Register touch action to activate Overview instead of toggling it
This is because the Overview will activate itself at the end of a 1:1 gesture, and a toggle action might actually deactivate it rather than activate it.
This commit is contained in:
parent
e58451fc01
commit
79a61deb25
1 changed files with 3 additions and 3 deletions
|
@ -229,20 +229,20 @@ EffectTogglableTouchBorder::EffectTogglableTouchBorder(EffectTogglableState *sta
|
|||
EffectTogglableTouchBorder::~EffectTogglableTouchBorder()
|
||||
{
|
||||
for (const ElectricBorder &border : std::as_const(m_touchBorderActivate)) {
|
||||
effects->unregisterTouchBorder(border, m_state->toggleAction());
|
||||
effects->unregisterTouchBorder(border, m_state->activateAction());
|
||||
}
|
||||
}
|
||||
|
||||
void EffectTogglableTouchBorder::setBorders(const QList<int> &touchActivateBorders)
|
||||
{
|
||||
for (const ElectricBorder &border : std::as_const(m_touchBorderActivate)) {
|
||||
effects->unregisterTouchBorder(border, m_state->toggleAction());
|
||||
effects->unregisterTouchBorder(border, m_state->activateAction());
|
||||
}
|
||||
m_touchBorderActivate.clear();
|
||||
|
||||
for (const int &border : touchActivateBorders) {
|
||||
m_touchBorderActivate.append(ElectricBorder(border));
|
||||
effects->registerRealtimeTouchBorder(ElectricBorder(border), m_state->toggleAction(), [this](ElectricBorder border, const QPointF &deltaProgress, const Output *screen) {
|
||||
effects->registerRealtimeTouchBorder(ElectricBorder(border), m_state->activateAction(), [this](ElectricBorder border, const QPointF &deltaProgress, const Output *screen) {
|
||||
if (m_state->status() == EffectTogglableState::Status::Active) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue