Fix scroll direction on window wheel command

Experimental testing in real world showed it's just a signing issue
in this specific case. The events passed to wayland clients scroll
in correct direction.
icc-effect-5.14.5
Martin Gräßlin 2016-02-18 10:11:20 +01:00
parent e6e11f7853
commit 6d47839e95
2 changed files with 3 additions and 3 deletions

View File

@ -456,9 +456,9 @@ void PointerInputTest::testModifierScrollOpacity()
quint32 timestamp = 1;
QFETCH(int, modifierKey);
waylandServer()->backend()->keyboardKeyPressed(modifierKey, timestamp++);
waylandServer()->backend()->pointerAxisVertical(5, timestamp++);
QCOMPARE(window->opacity(), 0.6);
waylandServer()->backend()->pointerAxisVertical(-5, timestamp++);
QCOMPARE(window->opacity(), 0.6);
waylandServer()->backend()->pointerAxisVertical(5, timestamp++);
QCOMPARE(window->opacity(), 0.5);
waylandServer()->backend()->keyboardKeyReleased(modifierKey, timestamp++);

View File

@ -554,7 +554,7 @@ public:
Options::MouseCommand command = Options::MouseNothing;
if (event->modifiers() == options->commandAllModifier()) {
wasAction = true;
command = options->operationWindowMouseWheel(event->angleDelta().y());
command = options->operationWindowMouseWheel(-1 * event->angleDelta().y());
} else {
command = c->getWheelCommand(Qt::Vertical, &wasAction);
}