Summary: | ScreenEdges::handleEnterNotifiy() an ScreenEdges::check() are called in a row, causing a double handleByCallback() | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | Thomas Lübking <thomas.luebking> |
Component: | general | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kwin/9139cca72c5612482c8c27e70196d583630772af | Version Fixed In: | 5.4.1 |
Description
Thomas Lübking
2015-08-22 20:49:44 UTC
diff --git a/screenedge.cpp b/screenedge.cpp index 35d84a0..b657675 100644 --- a/screenedge.cpp +++ b/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)) { Shouldn't be the check in Edge::canActivate? Check is there, but bypassed by the directActivate (notably the forceNoPushBack part) check. Those however do not matter; during the cooldown, there must be no trigger. Sounds reasonable ;-) Thanks for explaining. Git commit 9139cca72c5612482c8c27e70196d583630772af by Thomas Lübking. Committed on 27/08/2015 at 20:21. Pushed by luebking into branch 'Plasma/5.4'. 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 Related: bug 351869 FIXED-IN: 5.4.1 REVIEW: 124888 M +4 -0 screenedge.cpp http://commits.kde.org/kwin/9139cca72c5612482c8c27e70196d583630772af |