diff --git a/autotests/test_screen_edges.cpp b/autotests/test_screen_edges.cpp --- a/autotests/test_screen_edges.cpp +++ b/autotests/test_screen_edges.cpp @@ -652,8 +652,13 @@ QVERIFY(spy.isValid()); s->reserve(KWin::ElectricLeft, &callback, "callback"); s->reserve(KWin::ElectricBottomRight, &callback, "callback"); + QAction action; + s->reserveTouch(KWin::ElectricRight, &action); // currently there is no active client yet, so check blocking shouldn't do anything emit s->checkBlocking(); + for (auto e: s->findChildren()) { + QCOMPARE(e->activatesForTouchGesture(), e->border() == KWin::ElectricRight); + } xcb_enter_notify_event_t event; Cursor::setPos(0, 50); @@ -678,6 +683,7 @@ // the signal doesn't trigger for corners, let's go over all windows just to be sure that it doesn't call for corners for (auto e: s->findChildren()) { e->checkBlocking(); + QCOMPARE(e->activatesForTouchGesture(), false); } // calling again should not trigger QTest::qWait(160); @@ -691,6 +697,9 @@ // let's make the client not fullscreen, which should trigger client.setFullScreen(false); emit s->checkBlocking(); + for (auto e: s->findChildren()) { + QCOMPARE(e->activatesForTouchGesture(), e->border() == KWin::ElectricRight); + } event.time = QDateTime::currentMSecsSinceEpoch(); QVERIFY(s->isEntered(&event)); QVERIFY(!spy.isEmpty()); diff --git a/screenedge.cpp b/screenedge.cpp --- a/screenedge.cpp +++ b/screenedge.cpp @@ -197,6 +197,9 @@ if (!isScreenEdge()) { return false; } + if (m_blocked) { + return false; + } if (m_client) { return true; } @@ -538,7 +541,11 @@ if (newValue == m_blocked) { return; } + const bool wasTouch = activatesForTouchGesture(); m_blocked = newValue; + if (wasTouch != activatesForTouchGesture()) { + emit activatesForTouchGestureChanged(); + } doUpdateBlocking(); }