From 79a61deb2578a388bd1ac370e1366cd978581ee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Venerandi?= Date: Thu, 1 Feb 2024 23:26:53 +0100 Subject: [PATCH] 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. --- src/effect/effecttogglablestate.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/effect/effecttogglablestate.cpp b/src/effect/effecttogglablestate.cpp index 0fc5220217..297233be98 100644 --- a/src/effect/effecttogglablestate.cpp +++ b/src/effect/effecttogglablestate.cpp @@ -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 &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; }