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
remotes/origin/Plasma/5.4
Thomas Lübking 11 years ago
parent b5e3e4ac4c
commit 9139cca72c
  1. 4
      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)) {

Loading…
Cancel
Save