restore linked screenedges times

commit c6bd68d78a2e00ce094a4087c106aaf4067f9f57 fixed a bug
that allowed early invocation when pushback was forced down.
However, it also turned activation and re-activation time
additive again (ie. invocation could only happen after
r+a ms instead of after r ms)

see also REVIEW 124888
REVIEW: 125143
icc-effect-5.14.5
Thomas Lübking 2015-09-10 21:03:53 +02:00
parent 8686ca7ca0
commit 1d3a1aa061
2 changed files with 3 additions and 2 deletions

View File

@ -138,7 +138,7 @@ bool Edge::check(const QPoint &cursorPos, const QDateTime &triggerTime, bool for
return false;
}
if (m_lastTrigger.isValid() && // still in cooldown
m_lastTrigger.msecsTo(triggerTime) < edges()->reActivationThreshold()) {
m_lastTrigger.msecsTo(triggerTime) < edges()->reActivationThreshold() - edges()->timeThreshold()) {
return false;
}
// no pushback so we have to activate at once
@ -171,7 +171,7 @@ bool Edge::canActivate(const QPoint &cursorPos, const QDateTime &triggerTime)
m_lastReset = triggerTime;
return false;
}
if (m_lastTrigger.isValid() && m_lastTrigger.msecsTo(triggerTime) < edges()->reActivationThreshold()) {
if (m_lastTrigger.isValid() && m_lastTrigger.msecsTo(triggerTime) < edges()->reActivationThreshold() - edges()->timeThreshold()) {
return false;
}
if (m_lastReset.msecsTo(triggerTime) < edges()->timeThreshold()) {

View File

@ -564,6 +564,7 @@ inline void ScreenEdges::setDesktopSwitchingMovingClients(bool enable)
inline void ScreenEdges::setReActivationThreshold(int threshold)
{
Q_ASSERT(threshold >= m_timeThreshold);
m_reactivateThreshold = threshold;
}