diff --git a/autotests/wayland/pointer_input.cpp b/autotests/wayland/pointer_input.cpp index 7ea52ad4a3..974cb5eef3 100644 --- a/autotests/wayland/pointer_input.cpp +++ b/autotests/wayland/pointer_input.cpp @@ -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++); diff --git a/input.cpp b/input.cpp index 237e6ff3cc..ae8afc32f3 100644 --- a/input.cpp +++ b/input.cpp @@ -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); }