Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/modifier_only_shortcut_test.cpp
Show First 20 Lines • Show All 341 Lines • ▼ Show 20 Line(s) | 315 | { | |||
---|---|---|---|---|---|
342 | triggeredSpy.clear(); | 342 | triggeredSpy.clear(); | ||
343 | 343 | | |||
344 | // now disable global shortcuts | 344 | // now disable global shortcuts | ||
345 | workspace()->disableGlobalShortcutsForClient(true); | 345 | workspace()->disableGlobalShortcutsForClient(true); | ||
346 | QVERIFY(workspace()->globalShortcutsDisabled()); | 346 | QVERIFY(workspace()->globalShortcutsDisabled()); | ||
347 | // Should not get triggered | 347 | // Should not get triggered | ||
348 | kwinApp()->platform()->keyboardKeyPressed(modifier, timestamp++); | 348 | kwinApp()->platform()->keyboardKeyPressed(modifier, timestamp++); | ||
349 | kwinApp()->platform()->keyboardKeyReleased(modifier, timestamp++); | 349 | kwinApp()->platform()->keyboardKeyReleased(modifier, timestamp++); | ||
350 | QEXPECT_FAIL("", "BUG 370146", Continue); | | |||
351 | QCOMPARE(triggeredSpy.count(), 0); | 350 | QCOMPARE(triggeredSpy.count(), 0); | ||
352 | triggeredSpy.clear(); | 351 | triggeredSpy.clear(); | ||
353 | 352 | | |||
354 | // enable again | 353 | // enable again | ||
355 | workspace()->disableGlobalShortcutsForClient(false); | 354 | workspace()->disableGlobalShortcutsForClient(false); | ||
356 | QVERIFY(!workspace()->globalShortcutsDisabled()); | 355 | QVERIFY(!workspace()->globalShortcutsDisabled()); | ||
357 | // should get triggered again | 356 | // should get triggered again | ||
358 | kwinApp()->platform()->keyboardKeyPressed(modifier, timestamp++); | 357 | kwinApp()->platform()->keyboardKeyPressed(modifier, timestamp++); | ||
359 | kwinApp()->platform()->keyboardKeyReleased(modifier, timestamp++); | 358 | kwinApp()->platform()->keyboardKeyReleased(modifier, timestamp++); | ||
360 | QCOMPARE(triggeredSpy.count(), 1); | 359 | QCOMPARE(triggeredSpy.count(), 1); | ||
361 | } | 360 | } | ||
362 | 361 | | |||
363 | WAYLANDTEST_MAIN(ModifierOnlyShortcutTest) | 362 | WAYLANDTEST_MAIN(ModifierOnlyShortcutTest) | ||
364 | #include "modifier_only_shortcut_test.moc" | 363 | #include "modifier_only_shortcut_test.moc" |