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
This commit is contained in:
Thomas Lübking 2015-08-23 11:56:17 +02:00
parent b5e3e4ac4c
commit 9139cca72c

View file

@ -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)) {