Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/internal_window.cpp
Show First 20 Lines • Show All 195 Lines • ▼ Show 20 Line(s) | 184 | { | |||
---|---|---|---|---|---|
196 | QCOMPARE(screens()->count(), 2); | 196 | QCOMPARE(screens()->count(), 2); | ||
197 | QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); | 197 | QCOMPARE(screens()->geometry(0), QRect(0, 0, 1280, 1024)); | ||
198 | QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); | 198 | QCOMPARE(screens()->geometry(1), QRect(1280, 0, 1280, 1024)); | ||
199 | waylandServer()->initWorkspace(); | 199 | waylandServer()->initWorkspace(); | ||
200 | } | 200 | } | ||
201 | 201 | | |||
202 | void InternalWindowTest::init() | 202 | void InternalWindowTest::init() | ||
203 | { | 203 | { | ||
204 | Cursor::setPos(QPoint(1280, 512)); | 204 | Cursors::self()->mouse()->setPos(QPoint(1280, 512)); | ||
205 | QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Seat)); | 205 | QVERIFY(Test::setupWaylandConnection(Test::AdditionalWaylandInterface::Seat)); | ||
206 | QVERIFY(Test::waitForWaylandKeyboard()); | 206 | QVERIFY(Test::waitForWaylandKeyboard()); | ||
207 | } | 207 | } | ||
208 | 208 | | |||
209 | void InternalWindowTest::cleanup() | 209 | void InternalWindowTest::cleanup() | ||
210 | { | 210 | { | ||
211 | Test::destroyWaylandConnection(); | 211 | Test::destroyWaylandConnection(); | ||
212 | 212 | | |||
▲ Show 20 Lines • Show All 399 Lines • ▼ Show 20 Line(s) | 595 | { | |||
612 | group.sync(); | 612 | group.sync(); | ||
613 | workspace()->slotReconfigure(); | 613 | workspace()->slotReconfigure(); | ||
614 | QCOMPARE(options->commandAllModifier(), Qt::AltModifier); | 614 | QCOMPARE(options->commandAllModifier(), Qt::AltModifier); | ||
615 | QCOMPARE(options->commandAll1(), Options::MouseUnrestrictedMove); | 615 | QCOMPARE(options->commandAll1(), Options::MouseUnrestrictedMove); | ||
616 | QCOMPARE(options->commandAll2(), Options::MouseUnrestrictedMove); | 616 | QCOMPARE(options->commandAll2(), Options::MouseUnrestrictedMove); | ||
617 | QCOMPARE(options->commandAll3(), Options::MouseUnrestrictedMove); | 617 | QCOMPARE(options->commandAll3(), Options::MouseUnrestrictedMove); | ||
618 | 618 | | |||
619 | // move cursor on window | 619 | // move cursor on window | ||
620 | Cursor::setPos(internalClient->frameGeometry().center()); | 620 | Cursors::self()->mouse()->setPos(internalClient->frameGeometry().center()); | ||
621 | 621 | | |||
622 | // simulate modifier+click | 622 | // simulate modifier+click | ||
623 | quint32 timestamp = 1; | 623 | quint32 timestamp = 1; | ||
624 | kwinApp()->platform()->keyboardKeyPressed(KEY_LEFTALT, timestamp++); | 624 | kwinApp()->platform()->keyboardKeyPressed(KEY_LEFTALT, timestamp++); | ||
625 | QVERIFY(!internalClient->isMove()); | 625 | QVERIFY(!internalClient->isMove()); | ||
626 | kwinApp()->platform()->pointerButtonPressed(BTN_LEFT, timestamp++); | 626 | kwinApp()->platform()->pointerButtonPressed(BTN_LEFT, timestamp++); | ||
627 | QVERIFY(internalClient->isMove()); | 627 | QVERIFY(internalClient->isMove()); | ||
628 | // release modifier should not change it | 628 | // release modifier should not change it | ||
Show All 19 Lines | 637 | { | |||
648 | 648 | | |||
649 | KConfigGroup group = kwinApp()->config()->group("MouseBindings"); | 649 | KConfigGroup group = kwinApp()->config()->group("MouseBindings"); | ||
650 | group.writeEntry("CommandAllKey", "Alt"); | 650 | group.writeEntry("CommandAllKey", "Alt"); | ||
651 | group.writeEntry("CommandAllWheel", "change opacity"); | 651 | group.writeEntry("CommandAllWheel", "change opacity"); | ||
652 | group.sync(); | 652 | group.sync(); | ||
653 | workspace()->slotReconfigure(); | 653 | workspace()->slotReconfigure(); | ||
654 | 654 | | |||
655 | // move cursor on window | 655 | // move cursor on window | ||
656 | Cursor::setPos(internalClient->frameGeometry().center()); | 656 | Cursors::self()->mouse()->setPos(internalClient->frameGeometry().center()); | ||
657 | 657 | | |||
658 | // set the opacity to 0.5 | 658 | // set the opacity to 0.5 | ||
659 | internalClient->setOpacity(0.5); | 659 | internalClient->setOpacity(0.5); | ||
660 | QCOMPARE(internalClient->opacity(), 0.5); | 660 | QCOMPARE(internalClient->opacity(), 0.5); | ||
661 | quint32 timestamp = 1; | 661 | quint32 timestamp = 1; | ||
662 | kwinApp()->platform()->keyboardKeyPressed(KEY_LEFTALT, timestamp++); | 662 | kwinApp()->platform()->keyboardKeyPressed(KEY_LEFTALT, timestamp++); | ||
663 | kwinApp()->platform()->pointerAxisVertical(-5, timestamp++); | 663 | kwinApp()->platform()->pointerAxisVertical(-5, timestamp++); | ||
664 | QCOMPARE(internalClient->opacity(), 0.6); | 664 | QCOMPARE(internalClient->opacity(), 0.6); | ||
▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines |