From c3ecf55bf8e01628c6a661dfaa81750a57051202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 13 Apr 2017 07:00:30 +0200 Subject: [PATCH] Do not handle ScreenEdges::check for Edges which don't activate for Pointer Summary: On X11 the edges reserved only for pointer started to show the approach geometry. This problem is addressed by this change. Touch screen events do not go through this method, neither is it used on Wayland. Test Plan: Tested on X11, problem fixed Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D5421 --- autotests/test_screen_edges.cpp | 3 +++ screenedge.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/autotests/test_screen_edges.cpp b/autotests/test_screen_edges.cpp index d68fa71280..ba97d52819 100644 --- a/autotests/test_screen_edges.cpp +++ b/autotests/test_screen_edges.cpp @@ -918,6 +918,9 @@ void TestScreenEdges::testTouchEdge() setPos(QPoint(0, 50)); QCOMPARE(s->isEntered(&event), false); QVERIFY(approachingSpy.isEmpty()); + // let's also verify the check + s->check(QPoint(0, 50), QDateTime::currentDateTime(), false); + QVERIFY(approachingSpy.isEmpty()); s->gestureRecognizer()->startSwipeGesture(QPoint(0, 50)); QCOMPARE(approachingSpy.count(), 1); diff --git a/screenedge.cpp b/screenedge.cpp index 269900a611..a5fe4c9ac5 100644 --- a/screenedge.cpp +++ b/screenedge.cpp @@ -1339,6 +1339,9 @@ void ScreenEdges::check(const QPoint &pos, const QDateTime &now, bool forceNoPus if (!(*it)->isReserved()) { continue; } + if (!(*it)->activatesForPointer()) { + continue; + } if ((*it)->approachGeometry().contains(pos)) { (*it)->startApproaching(); }