diff --git a/screenedge.cpp b/screenedge.cpp index b657675e54..fc94968622 100644 --- a/screenedge.cpp +++ b/screenedge.cpp @@ -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()) { diff --git a/screenedge.h b/screenedge.h index 4e3520d867..ccd9fcade8 100644 --- a/screenedge.h +++ b/screenedge.h @@ -564,6 +564,7 @@ inline void ScreenEdges::setDesktopSwitchingMovingClients(bool enable) inline void ScreenEdges::setReActivationThreshold(int threshold) { + Q_ASSERT(threshold >= m_timeThreshold); m_reactivateThreshold = threshold; }