From 9139cca72c5612482c8c27e70196d583630772af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 23 Aug 2015 11:56:17 +0200 Subject: [PATCH] never trigger edges during the cooldown regardless of whether the pushback is forced down or the user has deactivated it or whatever. The edge is waiting from previous activation and we need to prevent immediate reactivation since that may cause duplicate action and unwanted state toggles BUG: 351627 CCBUG: 351869 FIXED-IN: 5.4.1 REVIEW: 124888 --- screenedge.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/screenedge.cpp b/screenedge.cpp index 35d84a04eb..b657675e54 100644 --- a/screenedge.cpp +++ b/screenedge.cpp @@ -137,6 +137,10 @@ bool Edge::check(const QPoint &cursorPos, const QDateTime &triggerTime, bool for if (!triggersFor(cursorPos)) { return false; } + if (m_lastTrigger.isValid() && // still in cooldown + m_lastTrigger.msecsTo(triggerTime) < edges()->reActivationThreshold()) { + return false; + } // no pushback so we have to activate at once bool directActivate = forceNoPushBack || edges()->cursorPushBackDistance().isNull() || m_client; if (directActivate || canActivate(cursorPos, triggerTime)) {