From 03f66b02c329c6bcd0e56c24ede44769eb3712a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 13 Aug 2016 15:15:54 +0200 Subject: [PATCH] [autotest/integration] Add pointer axis events to ModifiersOnlyShortcutTest If a pointer axis is scrolled while a modifier is hold, the modifier only shortcuts should not trigger. The user wanted to use the modifier for the pointer axis. This is not implemented yet, thus all is QEXPECT_FAIL. --- .../integration/modifier_only_shortcut_test.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/autotests/integration/modifier_only_shortcut_test.cpp b/autotests/integration/modifier_only_shortcut_test.cpp index f077c851c..b4b1c16b2 100644 --- a/autotests/integration/modifier_only_shortcut_test.cpp +++ b/autotests/integration/modifier_only_shortcut_test.cpp @@ -219,6 +219,20 @@ void ModifierOnlyShortcutTest::testTrigger() QCOMPARE(input()->qtButtonStates(), Qt::NoButton); QEXPECT_FAIL("", "Button not yet handled", Continue); QCOMPARE(triggeredSpy.count(), 2); + + // scroll while mod is pressed + kwinApp()->platform()->keyboardKeyPressed(modifier, timestamp++); + kwinApp()->platform()->pointerAxisVertical(5.0, timestamp++); + kwinApp()->platform()->keyboardKeyReleased(modifier, timestamp++); + QEXPECT_FAIL("", "Axis not yet handled", Continue); + QCOMPARE(triggeredSpy.count(), 2); + + // same for horizontal + kwinApp()->platform()->keyboardKeyPressed(modifier, timestamp++); + kwinApp()->platform()->pointerAxisHorizontal(5.0, timestamp++); + kwinApp()->platform()->keyboardKeyReleased(modifier, timestamp++); + QEXPECT_FAIL("", "Axis not yet handled", Continue); + QCOMPARE(triggeredSpy.count(), 2); } WAYLANDTEST_MAIN(ModifierOnlyShortcutTest) -- GitLab