Only compare to last screenedge trigger time when triggered at least once

Greetings from the "wtf, how could that have ever worked" department.
This fixes the screenedge activation on Qt 5. The last trigger time is
only set after an activation so before activation it is invalid thus the
comparison to any value doesn't make sense.
icc-effect-5.14.5
Martin Gräßlin 2013-09-25 09:44:48 +02:00
parent be3a0cf4ca
commit 255140291f
1 changed files with 1 additions and 1 deletions

View File

@ -149,7 +149,7 @@ bool Edge::canActivate(const QPoint &cursorPos, const QDateTime &triggerTime)
m_lastReset = triggerTime;
return false;
}
if (m_lastTrigger.msecsTo(triggerTime) < edges()->reActivationThreshold()) {
if (m_lastTrigger.isValid() && m_lastTrigger.msecsTo(triggerTime) < edges()->reActivationThreshold()) {
return false;
}
if (m_lastReset.msecsTo(triggerTime) < edges()->timeThreshold()) {